Time Class Reference

#include <e32std.h>

class Time
Public Member Functions
IMPORT_C TIntDaysInMonth(TInt, TMonth)
IMPORT_C TBoolIsLeapYear(TInt)
IMPORT_C TIntLeapYearsUpTo(TInt)
IMPORT_C TTimeMaxTTime()
IMPORT_C TTimeMinTTime()
IMPORT_C TTimeNullTTime()

Detailed Description

A utility class whose functions may be used by the other date/time related classes.

Member Function Documentation

DaysInMonth ( TInt, TMonth )

IMPORT_C TIntDaysInMonth(TIntaYear,
TMonthaMonth
)[static]

Gets the number of days in a month.

Parameters
aYearThe year. Must be specified because of leap years.
aMonthMonth, from EJanuary to EDecember.
Return Value
The number of days in the month.

IsLeapYear ( TInt )

IMPORT_C TBoolIsLeapYear(TIntaYear)[static]

Tests whether a year is a leap year.

Parameters
aYearThe year of interest.
Return Value
True if leap year, False if not.

LeapYearsUpTo ( TInt )

IMPORT_C TIntLeapYearsUpTo(TIntaYear)[static]

Gets the number of leap years between year 0 (nominal Gregorian) and the specified year, inclusive.

The calendar used is nominal Gregorian with 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). No days are removed from September 1752 or any other month. Leap year calculation before 1600 uses 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.

Parameters
aYearThe final year in the range to search. If negative, the function will return a negative number of leap years.
Return Value
The number of leap years between year 0 (nominal Gregorian) and aYear.

MaxTTime ( )

IMPORT_C TTimeMaxTTime()[static]

Gets the maximum time value which can be held in a TTime object.

Return Value
The maximum TTime value.

MinTTime ( )

IMPORT_C TTimeMinTTime()[static]

Gets the minimum time value which can be held in a TTime object.

Return Value
The minimum TTime value.

NullTTime ( )

IMPORT_C TTimeNullTTime()[static]

Gets a TTime with a null value.

Return Value
TTime object with a null value.