class TTime |
Stores and manipulates the date and time.
It represents a date and time as a number of microseconds since midnight, January 1st, 1 AD nominal Gregorian. BC dates are represented by negative TTime values. A TTime object may be constructed from a TInt64, a TDateTime a string literal, or by default, which initialises the time to an arbitrary value. To access human-readable time information, the TTime may be converted from a TInt64 into a TDateTime, which represents the date and time as seven numeric fields and provides functions to extract these fields. Alternatively, to display the time as text, the time may be formatted and placed into a descriptor using a variety of formatting commands and which may or may not honour the system's locale settings. The conversion between time and text may be performed the other way around, so that a descriptor can be parsed and converted into a TTime value.
In addition to setting and getting the date and time and converting between text and time, TTime provides functions to get intervals between times and standard comparison and arithmetic operators which enable time intervals to be added or subtracted to or from the time.
Private Member Functions | |
---|---|
TTime | Convert(const TDateTime &) |
Private Attributes | |
---|---|
__DECLARE_TEST | |
TInt64 | iTime |
TTime | ( | const TInt64 & | aTime | ) | [inline] |
Constructs the object from a 64-bit microsecond value.
const TInt64 & aTime | Microsecond value to which to initialise the TTime object. |
IMPORT_C | TTime | ( | const TDateTime & | aDateTime | ) |
const TDateTime & aDateTime |
TTime | Convert | ( | const TDateTime & | aDateTime | ) | [private, static] |
const TDateTime & aDateTime |
IMPORT_C void | FormatL | ( | TDes & | aDes, |
const TDesC & | aFormat, | |||
const TLocale & | aLocale | |||
) | const |
IMPORT_C TInt | HoursFrom | ( | TTime | aTime, |
TTimeIntervalHours & | aInterval | |||
) | const |
TTime aTime | |
TTimeIntervalHours & aInterval |
const TInt64 & | Int64 | ( | ) | const [inline] |
Gets the 64 bit integer representation of this TTime obect.
The 64 bit integer representation.
IMPORT_C TTimeIntervalMicroSeconds | MicroSecondsFrom | ( | TTime | aTime | ) | const |
TTime aTime |
IMPORT_C TInt | MinutesFrom | ( | TTime | aTime, |
TTimeIntervalMinutes & | aInterval | |||
) | const |
TTime aTime | |
TTimeIntervalMinutes & aInterval |
IMPORT_C TInt | SecondsFrom | ( | TTime | aTime, |
TTimeIntervalSeconds & | aInterval | |||
) | const |
TTime aTime | |
TTimeIntervalSeconds & aInterval |
IMPORT_C TInt | WeekNoInYear | ( | TFirstWeekRule | aRule | ) | const |
TFirstWeekRule aRule |
IMPORT_C TInt | WeekNoInYear | ( | TTime | aStartDate, |
TFirstWeekRule | aRule | |||
) | const |
TTime aStartDate | |
TFirstWeekRule aRule |
TBool | operator!= | ( | TTime | aTime | ) | const [inline] |
Tests whether two date/times are not equal.
True if the two TTimes are different. False if the same.
TTime aTime | The date/time to be compared with this TTime. |
IMPORT_C TTime | operator+ | ( | TTimeIntervalYears | aYear | ) | const |
TTimeIntervalYears aYear |
IMPORT_C TTime | operator+ | ( | TTimeIntervalMonths | aMonth | ) | const |
TTimeIntervalMonths aMonth |
IMPORT_C TTime | operator+ | ( | TTimeIntervalDays | aDay | ) | const |
TTimeIntervalDays aDay |
IMPORT_C TTime | operator+ | ( | TTimeIntervalHours | aHour | ) | const |
TTimeIntervalHours aHour |
IMPORT_C TTime | operator+ | ( | TTimeIntervalMinutes | aMinute | ) | const |
TTimeIntervalMinutes aMinute |
IMPORT_C TTime | operator+ | ( | TTimeIntervalSeconds | aSecond | ) | const |
TTimeIntervalSeconds aSecond |
IMPORT_C TTime | operator+ | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) | const |
TTimeIntervalMicroSeconds aMicroSecond |
IMPORT_C TTime | operator+ | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) | const |
TTimeIntervalMicroSeconds32 aMicroSecond |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalYears | aYear | ) |
TTimeIntervalYears aYear |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalMonths | aMonth | ) |
TTimeIntervalMonths aMonth |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalDays | aDay | ) |
TTimeIntervalDays aDay |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalHours | aHour | ) |
TTimeIntervalHours aHour |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalMinutes | aMinute | ) |
TTimeIntervalMinutes aMinute |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalSeconds | aSecond | ) |
TTimeIntervalSeconds aSecond |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) |
TTimeIntervalMicroSeconds aMicroSecond |
IMPORT_C TTime & | operator+= | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) |
TTimeIntervalMicroSeconds32 aMicroSecond |
IMPORT_C TTime | operator- | ( | TTimeIntervalYears | aYear | ) | const |
TTimeIntervalYears aYear |
IMPORT_C TTime | operator- | ( | TTimeIntervalMonths | aMonth | ) | const |
TTimeIntervalMonths aMonth |
IMPORT_C TTime | operator- | ( | TTimeIntervalDays | aDay | ) | const |
TTimeIntervalDays aDay |
IMPORT_C TTime | operator- | ( | TTimeIntervalHours | aHour | ) | const |
TTimeIntervalHours aHour |
IMPORT_C TTime | operator- | ( | TTimeIntervalMinutes | aMinute | ) | const |
TTimeIntervalMinutes aMinute |
IMPORT_C TTime | operator- | ( | TTimeIntervalSeconds | aSecond | ) | const |
TTimeIntervalSeconds aSecond |
IMPORT_C TTime | operator- | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) | const |
TTimeIntervalMicroSeconds aMicroSecond |
IMPORT_C TTime | operator- | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) | const |
TTimeIntervalMicroSeconds32 aMicroSecond |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalYears | aYear | ) |
TTimeIntervalYears aYear |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalMonths | aMonth | ) |
TTimeIntervalMonths aMonth |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalDays | aDay | ) |
TTimeIntervalDays aDay |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalHours | aHour | ) |
TTimeIntervalHours aHour |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalMinutes | aMinute | ) |
TTimeIntervalMinutes aMinute |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalSeconds | aSecond | ) |
TTimeIntervalSeconds aSecond |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) |
TTimeIntervalMicroSeconds aMicroSecond |
IMPORT_C TTime & | operator-= | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) |
TTimeIntervalMicroSeconds32 aMicroSecond |
TBool | operator< | ( | TTime | aTime | ) | const [inline] |
Tests whether this date/time is earlier than the specified date/time.
True if this date/time is earlier than the specified date/time. False otherwise.
TTime aTime | The date/time to be compared with this date/time. |
TBool | operator<= | ( | TTime | aTime | ) | const [inline] |
Tests whether this date/time is earlier than or the same as the specified date/time.
True if this date/time is earlier than or the same as the specified date/time. False otherwise.
TTime aTime | The date/time to be compared with this date/time. |
TTime & | operator= | ( | const TInt64 & | aTime | ) | [inline] |
const TInt64 & aTime | Microsecond value which to assign to the TTime object. |
IMPORT_C TTime & | operator= | ( | const TDateTime & | aDateTime | ) |
const TDateTime & aDateTime |
TBool | operator== | ( | TTime | aTime | ) | const [inline] |
Tests whether two date/times are equal.
True if the two TTimes are equal. False if not.
TTime aTime | The time to be compared with this TTime. |
TBool | operator> | ( | TTime | aTime | ) | const [inline] |
Tests whether this date/time is later than the specified date/time.
True if this date/time is later than the specified date/time. False otherwise.
TTime aTime | The date/time to be compared with this date/time. |
TBool | operator>= | ( | TTime | aTime | ) | const [inline] |
Tests whether this date/time is later than or the same as the specified date/time.
True if this date/time is later than or the same as the specified date/time. False otherwise.
TTime aTime | The date/time to be compared with this date/time. |