|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Stores and manipulates the date and time. More...
#include <e32std.h>
Public Member Functions | |
| TTime () | |
| Default constructor. | |
| TTime (const TInt64 &aTime) | |
| Constructs the object from a 64-bit microsecond value. | |
| IMPORT_C | TTime (const TDesC &aString) |
| Constructs a TTime object with a text string. | |
| IMPORT_C | TTime (const TDateTime &aDateTime) |
| Constructs a TTime object with the seven fields which comprise a date and time. | |
| TTime & | operator= (const TInt64 &aTime) |
| Assigns a value contained in a 64-bit integer to this TTime object. | |
| IMPORT_C TTime & | operator= (const TDateTime &aDateTime) |
| Assigns a TDateTime object to this TTime object. | |
| IMPORT_C void | HomeTime () |
| Sets the date and time of this TTime to the home time. | |
| IMPORT_C void | UniversalTime () |
| Sets the date and time of this TTime to the universal time. | |
| IMPORT_C TInt | Set (const TDesC &aString) |
| Assigns a date and time contained in a descriptor to this TTime object. | |
| IMPORT_C TInt | HomeTimeSecure () |
| Sets the date and time of this TTime to the secure home time. | |
| IMPORT_C TInt | UniversalTimeSecure () |
| Sets the date and time of this TTime to the secure universal time. | |
| IMPORT_C TDateTime | DateTime () const |
| Converts the TTime object into a TDateTime object. | |
| IMPORT_C TTimeIntervalMicroSeconds | MicroSecondsFrom (TTime aTime) const |
| Calculates the number of microseconds difference between the specified TTime and this TTime. | |
| IMPORT_C TInt | SecondsFrom (TTime aTime, TTimeIntervalSeconds &aInterval) const |
| Calculates the number of seconds difference between the specified TTime and this TTime. | |
| IMPORT_C TInt | MinutesFrom (TTime aTime, TTimeIntervalMinutes &aInterval) const |
| Calculates the number of minutes difference between the specified TTime and this TTime. | |
| IMPORT_C TInt | HoursFrom (TTime aTime, TTimeIntervalHours &aInterval) const |
| Calculates the number of hours difference between the specified TTime and this TTime. | |
| IMPORT_C TTimeIntervalDays | DaysFrom (TTime aTime) const |
| Calculates the number of days difference between the specified TTime and this TTime. | |
| IMPORT_C TTimeIntervalMonths | MonthsFrom (TTime aTime) const |
| Calculates the number of months between the specified TTime and this TTime. | |
| IMPORT_C TTimeIntervalYears | YearsFrom (TTime aTime) const |
| Calculates the number of years between the specified TTime and this TTime. | |
| IMPORT_C TInt | DaysInMonth () const |
| Gets the number of days in the current month. | |
| IMPORT_C TDay | DayNoInWeek () const |
| Gets the day number within the current week. | |
| IMPORT_C TInt | DayNoInMonth () const |
| Gets the day number in the month. | |
| IMPORT_C TInt | DayNoInYear () const |
| Gets the day number in the year. | |
| IMPORT_C TInt | DayNoInYear (TTime aStartDate) const |
| Gets the day number in the year when the start of the year is aStartDate. | |
| IMPORT_C TInt | WeekNoInYear () const |
| Gets the number of the current week in the year. | |
| IMPORT_C TInt | WeekNoInYear (TTime aStartDate) const |
| Gets the number of the current week in the year when the year starts on aStartDate. | |
| IMPORT_C TInt | WeekNoInYear (TFirstWeekRule aRule) const |
| Finds the number of the current week in the year using the first week rule specified in aRule. | |
| IMPORT_C TInt | WeekNoInYear (TTime aStartDate, TFirstWeekRule aRule) const |
| Finds the number of the current week in the year when the year starts from aStartDate and when using the start week rule aRule. | |
| IMPORT_C void | FormatL (TDes &aDes, const TDesC &aFormat) const |
| Puts this TTime into a descriptor and formats it according to the format string specified in the second argument. | |
| IMPORT_C void | FormatL (TDes &aDes, const TDesC &aFormat, const TLocale &aLocale) const |
| Puts this TTime into a descriptor and formats it according to the format string specified in the second argument. | |
| IMPORT_C void | RoundUpToNextMinute () |
| Rounds this TTime up to the next minute. | |
| IMPORT_C TInt | Parse (const TDesC &aDes, TInt aCenturyOffset=0) |
| Parses a descriptor containing either or both a date and time, and sets this TTime to the value of the parsed descriptor. | |
| IMPORT_C TTime | operator+ (TTimeIntervalYears aYear) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator+ (TTimeIntervalMonths aMonth) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator+ (TTimeIntervalDays aDay) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator+ (TTimeIntervalHours aHour) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator+ (TTimeIntervalMinutes aMinute) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator+ (TTimeIntervalSeconds aSecond) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator+ (TTimeIntervalMicroSeconds aMicroSecond) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator+ (TTimeIntervalMicroSeconds32 aMicroSecond) const |
| Adds a time interval to this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalYears aYear) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalMonths aMonth) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalDays aDay) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalHours aHour) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalMinutes aMinute) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalSeconds aSecond) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalMicroSeconds aMicroSecond) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime | operator- (TTimeIntervalMicroSeconds32 aMicroSecond) const |
| Substracts a time interval from this TTime, returning the result as a TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalYears aYear) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalMonths aMonth) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalDays aDay) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalHours aHour) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalMinutes aMinute) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalSeconds aSecond) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalMicroSeconds aMicroSecond) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator+= (TTimeIntervalMicroSeconds32 aMicroSecond) |
| Adds a time interval to this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalYears aYear) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalMonths aMonth) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalDays aDay) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalHours aHour) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalMinutes aMinute) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalSeconds aSecond) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalMicroSeconds aMicroSecond) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| IMPORT_C TTime & | operator-= (TTimeIntervalMicroSeconds32 aMicroSecond) |
| Subtracts a time interval from this TTime, returning a reference to this TTime. | |
| TBool | operator== (TTime aTime) const |
| Tests whether two date/times are equal. | |
| TBool | operator!= (TTime aTime) const |
| Tests whether two date/times are not equal. | |
| TBool | operator>= (TTime aTime) const |
| Tests whether this date/time is later than or the same as the specified date/time. | |
| TBool | operator<= (TTime aTime) const |
| Tests whether this date/time is earlier than or the same as the specified date/time. | |
| TBool | operator> (TTime aTime) const |
| Tests whether this date/time is later than the specified date/time. | |
| TBool | operator< (TTime aTime) const |
| Tests whether this date/time is earlier than the specified date/time. | |
| const TInt64 & | Int64 () const |
| Gets the 64 bit integer representation of this TTime obect. | |
Stores and manipulates the date and time.
It represents a date and time as a number of microseconds since midnight at the beginning of 1 January, year 0 (using astronomical numbering, where year 2000 = 2000 AD, year 1600 = 1600 AD, year 1 = 1 AD, and so year 0 = 1 BC, year -100 = 101 BC, etc). The calendar used is nominal Gregorian, so no days are removed from September 1752 or any other month, but leap year calculations before 1600 use the Julian method of every four years, even for years which are exactly divisible by 100 but not by 400. Thus leap years include: 1200, 1300, 1400, 1500, 1600 and 2000; non-leap years include: 1601, 1700, 1800, 1900 and 2100.
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.
|
inline |
Default constructor.
The object is initialised to an arbitrary value.
(generated from Symbian Developer Library)
|
inline |
Constructs the object from a 64-bit microsecond value.
| aTime | Microsecond value to which to initialise the TTime object. |
(generated from Symbian Developer Library)
| IMPORT_C TTime::TTime | ( | const TDesC & | aString | ) |
Constructs a TTime object with a text string.
The string consists of up to three components, any or all of which may be omitted:
When all three components are present, the string should take the form:
YYYYMMDD:HHMMSS.MMMMMM
The conversion from text to time is carried out in the same manner as that used in TTime::Set().
For a list of the range of valid values for date and time components, see TDateTime::Set().
| aString | Date and time string for initializing the TTime object. |
Panic condition: USER 113, if the string is syntactically incorrect, for example, if neither a colon nor a dot is present, or if any component of the date or time is assigned an invalid value, or the year is negative.
(generated from Symbian Developer Library)
| IMPORT_C TTime::TTime | ( | const TDateTime & | aDateTime | ) |
Constructs a TTime object with the seven fields which comprise a date and time.
| aDateTime | Date and time to which to initialise the TTime object. |
(generated from Symbian Developer Library)
| IMPORT_C TDateTime TTime::DateTime | ( | ) | const |
Converts the TTime object into a TDateTime object.
This conversion must be done before the seven fields which comprise a date and time can be accessed.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::DayNoInMonth | ( | ) | const |
Gets the day number in the month.
(generated from Symbian Developer Library)
| IMPORT_C TDay TTime::DayNoInWeek | ( | ) | const |
Gets the day number within the current week.
This is a value in the range zero to six inclusive, and honours the setting specified in TLocale::SetStartOfWeek().
By default the first day in the week is Monday.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::DayNoInYear | ( | ) | const |
Gets the day number in the year.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::DayNoInYear | ( | TTime | aStartDate | ) | const |
Gets the day number in the year when the start of the year is aStartDate.
If no start date is specified, the default is January 1st.
| aStartDate | Indicates the date which is to be considered the start of the year. Default is 1st January. |
(generated from Symbian Developer Library)
| IMPORT_C TTimeIntervalDays TTime::DaysFrom | ( | TTime | aTime | ) | const |
Calculates the number of days difference between the specified TTime and this TTime.
The difference may be positive or negative.
| aTime | The time to be compared with this TTime. |
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::DaysInMonth | ( | ) | const |
Gets the number of days in the current month.
(generated from Symbian Developer Library)
Puts this TTime into a descriptor and formats it according to the format string specified in the second argument.
Many of the formatting commands use the system's locale settings for the date and time, for example the characters used to separate components of the date and time and the ordering of day, month and year. The list of formatting commands below is divided into two sections, the first of which lists the commands which operate without reference to the locale's date and time settings (see class TLocale) and the second table lists the commands which do use these settings.
The following formatting commands do not honour the locale-specific system settings:
%% : Include a single '' character in the string
%* : Abbreviate following item (the following item should not be preceded by a '' character).
C : Interpret the argument as the six digit microsecond component of the time. In its abbreviated form, ('*C') this should be followed by an integer between zero and six, where the integer indicates the number of digits to display.
D : Interpret the argument as the two digit day number in the month. Abbreviation suppresses leading zero.
E : Interpret the argument as the day name. Abbreviation is language-specific (e.g. English uses the first three letters).
F : Use this command for locale-independent ordering of date components. This orders the following day/month/year component(s) (D, M, Y for example) according to the order in which they are specified in the string. This removes the need to use %1 to %5 (described below).
H : Interpret the argument as the one or two digit hour component of the time in 24 hour time format. Abbreviation suppresses leading zero. For locale-dependent hour formatting, use J.
I : Interpret the argument as the one or two digit hour component of the time in 12 hour time format. The leading zero is automatically suppressed so that abbreviation has no effect. For locale-dependent hour formatting, use J.
M : Interpret the argument as the one or two digit month number. Abbreviation suppresses leading zero.
N : Interpret the argument as the month name. Abbreviation is language specific, e.g. English uses the first three letters only. When using locale-dependent formatting, (that is, F has not previously been specified), specifying N causes any subsequent occurrence of a month specifier in the string to insert the month as text rather than in numeric form. When using locale-independent formatting, specifying N causes the month to be inserted as text at that position, but any subsequent occurrence of M will cause the month to be inserted in numeric form.
S : Interpret the argument as the one or two digit seconds component of the time. Abbreviation suppresses leading zero.
T : Interpret the argument as the one or two digit minutes component of the time. Abbreviation suppresses leading zero.
W : Interpret the argument as the one or two digit week number in year. Abbreviation suppresses leading zero.
X : Interpret the argument as the date suffix. Cannot be abbreviated. When using locale-dependent formatting (that is, F has not previously been specified), X causes all further occurrences of the day number to be displayed with the date suffix. When using locale-independent formatting, a date suffix will be inserted only after the occurrence of the day number which X follows in the format string. Any further occurrence of D without a following X will insert the day number without a suffix.
Y : Interpret the argument as the four digit year number. Abbreviation suppresses the first two digits.
Z : Interpret the argument as the one, two or three digit day number in the year. Abbreviation suppresses leading zeros.
The following formatting commands do honour the locale-specific system settings:
%. : Interpret the argument as the decimal separator character (as set by TLocale::SetDecimalSeparator()). The decimal separator is used to separate seconds and microseconds, if present.
%: : Interpret the argument as one of the four time separator characters (as set by TLocale::SetTimeSeparator()). Must be followed by an integer between zero and three inclusive to indicate which time separator character is being referred to.
%/ : Interpret the argument as one of the four date separator characters (as set by TLocale::SetDateSeparator()). Must be followed by an integer between zero and three inclusive to indicate which date separator character is being referred to.
%1 : Interpret the argument as the first component of a three component date (i.e. day, month or year) where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean, this is the day, when EDateAmerican, the month, and when EDateJapanese, the year. For more information on this and the following four formatting commands, see the Notes section immediately below.
%2 : Interpret the argument as the second component of a three component date where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean, this is the month, when EDateAmerican, the day and when EDateJapanese, the month.
%3 : Interpret the argument as the third component of a three component date where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean, or EDateAmerican this is the year and when EDateJapanese, the day.
%4 : Interpret the argument as the first component of a two component date (day and month) where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean this is the day, and when EDateAmerican or EDateJapanese, the month.
%5 : Interpret the argument as the second component of a two component date (day and month) where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean this is the month, and when EDateAmerican or EDateJapanese, the day.
A : Interpret the argument as "am" or "pm" text according to the current language and time of day. Unlike the B formatting command (described below), A disregards the locale's 12 or 24 hour clock setting, so that when used without an inserted + or - sign, am/pm text will always be displayed. Whether a space is inserted between the am/pm text and the time depends on the locale-specific settings. However, if abbreviated (%*A), no space is inserted, regardless of the locale's settings. The am/pm text appears before or after the time, according to the position of the A, regardless of the locale-specific settings. For example, the following ordering of formatting commands causes am/pm text to be printed after the time: H T S A. Optionally, a minus or plus sign may be inserted between the "%" and the "A". This operates as follows:
%-A causes am/pm text to be inserted into the descriptor only if the am/pm symbol position has been set in the locale to ELocaleBefore. Cannot be abbreviated using asterisk.
%+A causes am/pm text to be inserted into the descriptor only if the am/pm symbol position has been set in the locale to ELocaleAfter. Cannot be abbreviated using asterisk. For example, the following formatting commands will cause am/pm text to be displayed after the time if the am/pm position has been set in the locale to ELocaleAfter or before the time if ELocaleBefore: %-A H T S %+A.
B Interpret the argument as am or pm text according to the current language and time of day. Unlike the A command, when using B, am/pm text is displayed only if the clock setting in the locale is 12-hour. Whether a space is inserted between the am/pm text and the time depends on the locale-specific settings. However, if abbreviated (%*B), no space is inserted, regardless of the locale's settings. The am/pm text appears before or after the time, according to the location of the "B", regardless of the locale-specific settings. For example, the following formatting commands cause am/pm text to be printed after the time: H T S B. Optionally, a minus or plus sign may be inserted between the "%" and the "B". This operates as follows:
%-B causes am/pm text to be inserted into the descriptor only if using a 12 hour clock and the am/pm symbol position has been set in the locale to ELocaleBefore. Cannot be abbreviated using asterisk.
%+B causes am/pm text to be inserted into the descriptor only if using a 12 hour clock and the am/pm symbol position has been set in the locale to ELocaleAfter. Cannot be abbreviated using asterisk. For example, the following formatting commands cause am/pm text to be printed after the time if the am/pm position has been set in the locale to ELocaleAfter or before the time if ELocaleBefore: %-B H T S %+B.
J Interpret the argument as the hour component of the time in either 12 or 24 hour clock format depending on the locale's clock format setting. When the clock format has been set to 12 hour, leading zeros are automatically suppressed so that abbreviation has no effect. Abbreviation suppresses leading zero only when using a 24 hour clock.
Notes:
The %1, %2, %3, %4 and %5 formatting commands are used in conjunction with D, M and Y to format the date locale-dependently. When formatting the date locale-dependently, the order of the day, month and year components within the string is determined by the order of the %1 to %5 formatting commands, not that of D, M, Y.
When formatting the date locale-independently (that is, F has been specified in the format string), the %1 to %5 formatting commands are not required, and should be omitted. In this case, the order of the date components is determined by the order of the D, M, Y format commands within aFormat.
Up to four date separators and up to four time separators can be used to separate the components of a date or time. When formatting a numerical date consisting of the day, month and year or a time containing hours, minutes and seconds, all four separators should always be specified in the format command string. Usually, the leading and trailing separators should not be displayed. In this case, the first and fourth separators should still be specified, but should be represented by a null character.
The date format follows the pattern:
DateSeparator[0] DateComponent1 DateSeparator[1] DateComponent2 DateSeparator[2] DateComponent3 DateSeparator[3]
where the ordering of date components is determined by the locale's date format setting.
The time format follows the pattern:
TimeSeparator[0] Hours TimeSeparator[1] Minutes TimeSeparator[2] Seconds TimeSeparator[3]
If the time includes a microseconds component, the third separator should occur after the microseconds, and the seconds and microseconds should be separated by the decimal separator. When formatting a two component time, the following rules apply:
if the time consists of hours and minutes, the third time delimiter should be omitted
if the time consists of minutes and seconds, the second time delimiter should be omitted
| aDes | Descriptor, which, on return contains the formatted date/time string. |
| aFormat | Format string which determines the format of the date and time. |
Leave condition: KErrOverflow The date/time string is too long for the descriptor aDes.
Leave condition: KErrGeneral A formatting error has occurred.
(generated from Symbian Developer Library)
Puts this TTime into a descriptor and formats it according to the format string specified in the second argument.
Many of the formatting commands use the system's locale settings for the date and time, for example the characters used to separate components of the date and time and the ordering of day, month and year. The list of formatting commands below is divided into two sections, the first of which lists the commands which operate without reference to the locale's date and time settings (see class TLocale) and the second table lists the commands which do use these settings.
The following formatting commands do not honour the locale-specific system settings:
%% : Include a single '' character in the string
%* : Abbreviate following item (the following item should not be preceded by a '' character).
C : Interpret the argument as the six digit microsecond component of the time. In its abbreviated form, ('*C') this should be followed by an integer between zero and six, where the integer indicates the number of digits to display.
D : Interpret the argument as the two digit day number in the month. Abbreviation suppresses leading zero.
E : Interpret the argument as the day name. Abbreviation is language-specific (e.g. English uses the first three letters).
F : Use this command for locale-independent ordering of date components. This orders the following day/month/year component(s) (D, M, Y for example) according to the order in which they are specified in the string. This removes the need to use %1 to %5 (described below).
H : Interpret the argument as the one or two digit hour component of the time in 24 hour time format. Abbreviation suppresses leading zero. For locale-dependent hour formatting, use J.
I : Interpret the argument as the one or two digit hour component of the time in 12 hour time format. The leading zero is automatically suppressed so that abbreviation has no effect. For locale-dependent hour formatting, use J.
M : Interpret the argument as the one or two digit month number. Abbreviation suppresses leading zero.
N : Interpret the argument as the month name. Abbreviation is language specific, e.g. English uses the first three letters only. When using locale-dependent formatting, (that is, F has not previously been specified), specifying N causes any subsequent occurrence of a month specifier in the string to insert the month as text rather than in numeric form. When using locale-independent formatting, specifying N causes the month to be inserted as text at that position, but any subsequent occurrence of M will cause the month to be inserted in numeric form.
S : Interpret the argument as the one or two digit seconds component of the time. Abbreviation suppresses leading zero.
T : Interpret the argument as the one or two digit minutes component of the time. Abbreviation suppresses leading zero.
W : Interpret the argument as the one or two digit week number in year. Abbreviation suppresses leading zero.
X : Interpret the argument as the date suffix. Cannot be abbreviated. When using locale-dependent formatting (that is, F has not previously been specified), X causes all further occurrences of the day number to be displayed with the date suffix. When using locale-independent formatting, a date suffix will be inserted only after the occurrence of the day number which X follows in the format string. Any further occurrence of D without a following X will insert the day number without a suffix.
Y : Interpret the argument as the four digit year number. Abbreviation suppresses the first two digits.
Z : Interpret the argument as the one, two or three digit day number in the year. Abbreviation suppresses leading zeros.
The following formatting commands do honour the locale-specific system settings:
%. : Interpret the argument as the decimal separator character (as set by TLocale::SetDecimalSeparator()). The decimal separator is used to separate seconds and microseconds, if present.
%: : Interpret the argument as one of the four time separator characters (as set by TLocale::SetTimeSeparator()). Must be followed by an integer between zero and three inclusive to indicate which time separator character is being referred to.
%/ : Interpret the argument as one of the four date separator characters (as set by TLocale::SetDateSeparator()). Must be followed by an integer between zero and three inclusive to indicate which date separator character is being referred to.
%1 : Interpret the argument as the first component of a three component date (i.e. day, month or year) where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean, this is the day, when EDateAmerican, the month, and when EDateJapanese, the year. For more information on this and the following four formatting commands, see the Notes section immediately below.
%2 : Interpret the argument as the second component of a three component date where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean, this is the month, when EDateAmerican, the day and when EDateJapanese, the month.
%3 : Interpret the argument as the third component of a three component date where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean, or EDateAmerican this is the year and when EDateJapanese, the day.
%4 : Interpret the argument as the first component of a two component date (day and month) where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean this is the day, and when EDateAmerican or EDateJapanese, the month.
%5 : Interpret the argument as the second component of a two component date (day and month) where the order has been set by TLocale::SetDateFormat(). When the date format is EDateEuropean this is the month, and when EDateAmerican or EDateJapanese, the day.
A : Interpret the argument as "am" or "pm" text according to the current language and time of day. Unlike the B formatting command (described below), A disregards the locale's 12 or 24 hour clock setting, so that when used without an inserted + or - sign, am/pm text will always be displayed. Whether a space is inserted between the am/pm text and the time depends on the locale-specific settings. However, if abbreviated (%*A), no space is inserted, regardless of the locale's settings. The am/pm text appears before or after the time, according to the position of the A, regardless of the locale-specific settings. For example, the following ordering of formatting commands causes am/pm text to be printed after the time: H T S A. Optionally, a minus or plus sign may be inserted between the "%" and the "A". This operates as follows:
%-A causes am/pm text to be inserted into the descriptor only if the am/pm symbol position has been set in the locale to ELocaleBefore. Cannot be abbreviated using asterisk.
%+A causes am/pm text to be inserted into the descriptor only if the am/pm symbol position has been set in the locale to ELocaleAfter. Cannot be abbreviated using asterisk. For example, the following formatting commands will cause am/pm text to be displayed after the time if the am/pm position has been set in the locale to ELocaleAfter or before the time if ELocaleBefore: %-A H T S %+A.
B Interpret the argument as am or pm text according to the current language and time of day. Unlike the A command, when using B, am/pm text is displayed only if the clock setting in the locale is 12-hour. Whether a space is inserted between the am/pm text and the time depends on the locale-specific settings. However, if abbreviated (%*B), no space is inserted, regardless of the locale's settings. The am/pm text appears before or after the time, according to the location of the "B", regardless of the locale-specific settings. For example, the following formatting commands cause am/pm text to be printed after the time: H T S B. Optionally, a minus or plus sign may be inserted between the "%" and the "B". This operates as follows:
%-B causes am/pm text to be inserted into the descriptor only if using a 12 hour clock and the am/pm symbol position has been set in the locale to ELocaleBefore. Cannot be abbreviated using asterisk.
%+B causes am/pm text to be inserted into the descriptor only if using a 12 hour clock and the am/pm symbol position has been set in the locale to ELocaleAfter. Cannot be abbreviated using asterisk. For example, the following formatting commands cause am/pm text to be printed after the time if the am/pm position has been set in the locale to ELocaleAfter or before the time if ELocaleBefore: %-B H T S %+B.
J Interpret the argument as the hour component of the time in either 12 or 24 hour clock format depending on the locale's clock format setting. When the clock format has been set to 12 hour, leading zeros are automatically suppressed so that abbreviation has no effect. Abbreviation suppresses leading zero only when using a 24 hour clock.
Notes:
The %1, %2, %3, %4 and %5 formatting commands are used in conjunction with D, M and Y to format the date locale-dependently. When formatting the date locale-dependently, the order of the day, month and year components within the string is determined by the order of the %1 to %5 formatting commands, not that of D, M, Y.
When formatting the date locale-independently (that is, F has been specified in the format string), the %1 to %5 formatting commands are not required, and should be omitted. In this case, the order of the date components is determined by the order of the D, M, Y format commands within aFormat.
Up to four date separators and up to four time separators can be used to separate the components of a date or time. When formatting a numerical date consisting of the day, month and year or a time containing hours, minutes and seconds, all four separators should always be specified in the format command string. Usually, the leading and trailing separators should not be displayed. In this case, the first and fourth separators should still be specified, but should be represented by a null character.
The date format follows the pattern:
DateSeparator[0] DateComponent1 DateSeparator[1] DateComponent2 DateSeparator[2] DateComponent3 DateSeparator[3]
where the ordering of date components is determined by the locale's date format setting.
The time format follows the pattern:
TimeSeparator[0] Hours TimeSeparator[1] Minutes TimeSeparator[2] Seconds TimeSeparator[3]
If the time includes a microseconds component, the third separator should occur after the microseconds, and the seconds and microseconds should be separated by the decimal separator. When formatting a two component time, the following rules apply:
if the time consists of hours and minutes, the third time delimiter should be omitted
if the time consists of minutes and seconds, the second time delimiter should be omitted
| aDes | Descriptor, which, on return contains the formatted date/time string. |
| aFormat | Format string which determines the format of the date and time. |
| aLocale | Specific locale which formatting will be based on. |
Leave condition: KErrOverflow The date/time string is too long for the descriptor aDes.
Leave condition: KErrGeneral A formatting error has occurred.
(generated from Symbian Developer Library)
| IMPORT_C void TTime::HomeTime | ( | ) |
Sets the date and time of this TTime to the home time.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::HomeTimeSecure | ( | ) |
Sets the date and time of this TTime to the secure home time.
Returns KErrNoSecureTime if there is no secure time source
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::HoursFrom | ( | TTime | aTime, |
| TTimeIntervalHours & | aInterval | ||
| ) | const |
Calculates the number of hours difference between the specified TTime and this TTime.
The difference may be positive or negative.
| aTime | The time to be compared with this TTime. |
| aInterval | On return contains the difference in hours between the two times. If the time specified in the first argument is later than this TTime, then this returned value is negative. |
(generated from Symbian Developer Library)
|
inline |
Gets the 64 bit integer representation of this TTime obect.
(generated from Symbian Developer Library)
| IMPORT_C TTimeIntervalMicroSeconds TTime::MicroSecondsFrom | ( | TTime | aTime | ) | const |
Calculates the number of microseconds difference between the specified TTime and this TTime.
| aTime | The time to be compared with this TTime. |
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::MinutesFrom | ( | TTime | aTime, |
| TTimeIntervalMinutes & | aInterval | ||
| ) | const |
Calculates the number of minutes difference between the specified TTime and this TTime.
The difference may be positive or negative.
| aTime | The time to be compared with this TTime. |
| aInterval | On return contains the difference in minutes between the two times. If the time specified in the first argument is later than this TTime, then this returned value is negative. |
(generated from Symbian Developer Library)
| IMPORT_C TTimeIntervalMonths TTime::MonthsFrom | ( | TTime | aTime | ) | const |
Calculates the number of months between the specified TTime and this TTime.
The result may be positive or negative.
The interval in months between two TTimes is calculated by incrementing it by one each time the same day number and time in the previous or following month has been reached. Exceptions to this rule occur when this TTime is on the last day of the month. In this case, the following rules apply:
When comparing this TTime with a later time:
When comparing this TTime with an earlier time:
| aTime | The time to be compared with this TTime. |
(generated from Symbian Developer Library)
|
inline |
Tests whether two date/times are not equal.
| aTime | The date/time to be compared with this TTime. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalDays | aDay | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aDay | A time interval in days. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to add more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalHours | aHour | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aHour | A time interval in hours. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to add more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aMicroSecond | A time interval in microseconds. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aMicroSecond | A time interval in microseconds. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to add more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalMinutes | aMinute | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aMinute | A time interval in minutes. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to add more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalMonths | aMonth | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that when adding one month to the last day in the month, if the following month is shorter, the result is the last day in the following month. For example, when adding one month to 31st August, the result is the 30th September.
Note also that this TTime object is not changed.
| aMonth | A time interval in months. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to add more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalSeconds | aSecond | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aSecond | A time interval in seconds. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to add more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator+ | ( | TTimeIntervalYears | aYear | ) | const |
Adds a time interval to this TTime, returning the result as a TTime.
Note that in a leap year, when adding one year to the 29th February, the result is the 28th February in the following year.
Note also that this TTime object is not changed.
| aYear | A time interval in years. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to add more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalDays | aDay | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aDay | A time interval in days. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalHours | aHour | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aHour | A time interval in hours. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aMicroSecond | A time interval in microseconds. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aMicroSecond | A time interval in microseconds, as a 32-bit integer. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalMinutes | aMinute | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aMinute | A time interval in minutes. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalMonths | aMonth | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aMonth | A time interval in months. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalSeconds | aSecond | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aSecond | A time interval in seconds. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator+= | ( | TTimeIntervalYears | aYear | ) |
Adds a time interval to this TTime, returning a reference to this TTime.
| aYear | A time interval in years. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalDays | aDay | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aDay | A time interval in days. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to subtract more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalHours | aHour | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aHour | A time interval in hours. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to subtract more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aMicroSecond | A time interval in microseconds. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aMicroSecond | A time interval in microseconds. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to subtract more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalMinutes | aMinute | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aMinute | A time interval in minutes. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to subtract more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalMonths | aMonth | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that when subtracting one month from the last day in the month, if the preceding month is shorter, the result is the last day in the preceding month. For example, when subtracting 1 month from 31st October, the result is the 30th September.
Note also that this TTime object is not changed.
| aMonth | A time interval in months. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to subtract more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalSeconds | aSecond | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that this TTime object is not changed.
| aSecond | A time interval in seconds. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to subtract more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime TTime::operator- | ( | TTimeIntervalYears | aYear | ) | const |
Substracts a time interval from this TTime, returning the result as a TTime.
Note that in a leap year, when subtracting one year from the 29th February, the result is 28th February in the preceding year.
Note also that this TTime object is not changed.
| aYear | A time interval in years. The argument is stored as a 32 bit signed integer. The maximum value which it can represent is 2147483647. Any attempt to subtract more than this amount will produce incorrect results. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalDays | aDay | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aDay | A time interval in days. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalHours | aHour | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aHour | A time interval in hours. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalMicroSeconds | aMicroSecond | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aMicroSecond | A time interval in microseconds. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalMicroSeconds32 | aMicroSecond | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aMicroSecond | A time interval in microseconds, as a 32-bit integer. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalMinutes | aMinute | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aMinute | A time interval in minutes. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalMonths | aMonth | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aMonth | A time interval in months. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalSeconds | aSecond | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aSecond | A time interval in seconds. |
(generated from Symbian Developer Library)
| IMPORT_C TTime & TTime::operator-= | ( | TTimeIntervalYears | aYear | ) |
Subtracts a time interval from this TTime, returning a reference to this TTime.
| aYear | A time interval in years. |
(generated from Symbian Developer Library)
|
inline |
Tests whether this date/time is earlier than the specified date/time.
| aTime | The date/time to be compared with this date/time. |
(generated from Symbian Developer Library)
|
inline |
Tests whether this date/time is earlier than or the same as the specified date/time.
| aTime | The date/time to be compared with this date/time. |
(generated from Symbian Developer Library)
Assigns a TDateTime object to this TTime object.
| aDateTime | The date and time to assign to this TTime object. |
(generated from Symbian Developer Library)
|
inline |
Assigns a value contained in a 64-bit integer to this TTime object.
| aTime | Microsecond value which to assign to the TTime object. |
(generated from Symbian Developer Library)
|
inline |
Tests whether two date/times are equal.
| aTime | The time to be compared with this TTime. |
(generated from Symbian Developer Library)
|
inline |
Tests whether this date/time is later than the specified date/time.
| aTime | The date/time to be compared with this date/time. |
(generated from Symbian Developer Library)
|
inline |
Tests whether this date/time is later than or the same as the specified date/time.
| aTime | The date/time to be compared with this date/time. |
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::Parse | ( | const TDesC & | aDes, |
| TInt | aCenturyOffset = 0 |
||
| ) |
Parses a descriptor containing either or both a date and time, and sets this TTime to the value of the parsed descriptor.
The descriptor may contain the date only, the time only, the date followed by the time, or the time followed by the date. When both the date and time are specified in the descriptor, they should be separated using one or more space characters.
Leading zeros and spaces preceding any time or date components are discarded.
Dates may be specified either with all three components (day, month and year), or with just two components; for example month and day. The date suffix ("st" "nd" "rd" or "th") may not be included in the descriptor.
The date and its components may take different forms:
2 European (DD/MM/YYYY), American (MM/DD/YYYY) and Japanese (YYYY/MM/DD) date formats are supported. An exception to this ordering of date components occurs when European or American formatting is used and the month is represented by text. In this case, the month may be positioned in either the first or second field. When using Japanese date format, the month, whether text or numbers, must always be the second field.
If a colon or a dot has been specified in TLocale as the date separator character, neither may be used as date separators in this function.
If specified, the time must include the hour, but both minutes and seconds, or seconds alone may be omitted.
The time and its components may take different forms:
When a character can be interpreted as either a date or time separator character, this function will interpret it as a date separator.
Look out for cases in which wrongly interpreting the contents of a descriptor, based on the interpretation of separator characters, causes an error. For example, trying to interpret "5.6.1996" as a time is invalid and will return an error of -2 because 1,996 seconds is out of range.
Notes:
| aDes | Descriptor containing any combination of date and time as text. |
| aCenturyOffset | Offset between zero (the default) and 99. Allows a flexible interpretation of the century for two digit year values. If less than zero, or greater than 99, a panic occurs. |
(generated from Symbian Developer Library)
| IMPORT_C void TTime::RoundUpToNextMinute | ( | ) |
Rounds this TTime up to the next minute.
Both the seconds and microseconds components are set to zero.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::SecondsFrom | ( | TTime | aTime, |
| TTimeIntervalSeconds & | aInterval | ||
| ) | const |
Calculates the number of seconds difference between the specified TTime and this TTime.
The difference may be positive or negative.
| aTime | The time to be compared with this TTime. |
| aInterval | On return contains the difference in seconds between the two times. If the time specified in the first argument is later than this TTime, then this returned value is negative. |
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::Set | ( | const TDesC & | aString | ) |
Assigns a date and time contained in a descriptor to this TTime object.
The string consists of up to three components, any or all of which may be omitted:
When all three components are present, the string should take the form:
YYYYMMDD:HHMMSS.MMMMMM
If omitted, the first component is set to January 1st 0 AD nominal Gregorian. If either the second or third components are omitted, they are set to zero.
Notes:
2.1 If the microsecond component is omitted, the preceding dot may also be omitted.
2.2 The colon can be omitted only if a dot is located at string position zero (indicating that the first two components are missing), or at string position six (indicating that the first component only is missing).
| aString | The date and time to be assigned to this TTime object. |
(generated from Symbian Developer Library)
| IMPORT_C void TTime::UniversalTime | ( | ) |
Sets the date and time of this TTime to the universal time.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::UniversalTimeSecure | ( | ) |
Sets the date and time of this TTime to the secure universal time.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::WeekNoInYear | ( | ) | const |
Gets the number of the current week in the year.
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::WeekNoInYear | ( | TFirstWeekRule | aRule | ) | const |
Finds the number of the current week in the year using the first week rule specified in aRule.
| aRule | Determines how the first week in the year is to be calculated. By default EFirstFourDayWeek. |
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::WeekNoInYear | ( | TTime | aStartDate | ) | const |
Gets the number of the current week in the year when the year starts on aStartDate.
| aStartDate | If specified, indicates the date which is to be considered the start of the year. Default is 1st January. |
(generated from Symbian Developer Library)
| IMPORT_C TInt TTime::WeekNoInYear | ( | TTime | aStartDate, |
| TFirstWeekRule | aRule | ||
| ) | const |
Finds the number of the current week in the year when the year starts from aStartDate and when using the start week rule aRule.
| aStartDate | If specified, indicates the date which is to be considered the start of the year. Default is 1st January. |
| aRule | Determines how the first week in the year is to be calculated. By default EFirstFourDayWeek. |
(generated from Symbian Developer Library)
| IMPORT_C TTimeIntervalYears TTime::YearsFrom | ( | TTime | aTime | ) | const |
Calculates the number of years between the specified TTime and this TTime.
The result may be positive or negative.
Note that the interval in years between two TTimes is calculated by incrementing it by one each time the same day number and time in the previous or following year has been reached. The exception to this rule occurs when this TTime is the last day in February in a leap year. In this case, one year is deemed to have passed when the same time of day on the last day in the preceding or following February has been reached.
| aTime | The time to be compared with this TTime. |
(generated from Symbian Developer Library)