TDateTime Class Reference

class TDateTime

A date and time object in which the individual components are accessible in human-readable form.

The individual components are: year, month, day, hour, minute, second and microsecond.

These components are stored as integers and all except the year are checked for validity when a TDateTime is constructed or assigned new values.

This class only supports getting and setting the entire date/time or any component of it. It does not support adding or subtracting intervals to or from a time. For functions which manipulate times, use class TTime.

TTime

Constructor & Destructor Documentation

TDateTime()

TDateTime()[inline]

Constructs an uninitialised TDateTime object.

TDateTime(TInt, TMonth, TInt, TInt, TInt, TInt, TInt)

IMPORT_CTDateTime(TIntaYear,
TMonthaMonth,
TIntaDay,
TIntaHour,
TIntaMinute,
TIntaSecond,
TIntaMicroSecond
)

Parameters

TInt aYear
TMonth aMonth
TInt aDay
TInt aHour
TInt aMinute
TInt aSecond
TInt aMicroSecond

Member Functions Documentation

Day()

TInt Day()const [inline]

Gets the day component of the date/time.

The day. Offset from zero, so add one before displaying the day number.

Hour()

TInt Hour()const [inline]

Gets the hour component of the date/time.

The hour.

MicroSecond()

TInt MicroSecond()const [inline]

Gets the microsecond component of the date/time.

The microsecond.

Minute()

TInt Minute()const [inline]

Gets the minute component of the date/time.

The minute.

Month()

TMonth Month()const [inline]

Gets the month component of the date/time.

The month. EJanuary to EDecember. Offset from zero, so add one before displaying the month number.

Second()

TInt Second()const [inline]

Gets the second component of the date/time.

The second.

Set(TInt, TMonth, TInt, TInt, TInt, TInt, TInt)

IMPORT_C TIntSet(TIntaYear,
TMonthaMonth,
TIntaDay,
TIntaHour,
TIntaMinute,
TIntaSecond,
TIntaMicroSecond
)

Parameters

TInt aYear
TMonth aMonth
TInt aDay
TInt aHour
TInt aMinute
TInt aSecond
TInt aMicroSecond

SetDay(TInt)

IMPORT_C TIntSetDay(TIntaDay)

Parameters

TInt aDay

SetHour(TInt)

IMPORT_C TIntSetHour(TIntaHour)

Parameters

TInt aHour

SetMicroSecond(TInt)

IMPORT_C TIntSetMicroSecond(TIntaMicroSecond)

Parameters

TInt aMicroSecond

SetMinute(TInt)

IMPORT_C TIntSetMinute(TIntaMinute)

Parameters

TInt aMinute

SetMonth(TMonth)

IMPORT_C TIntSetMonth(TMonthaMonth)

Parameters

TMonth aMonth

SetSecond(TInt)

IMPORT_C TIntSetSecond(TIntaSecond)

Parameters

TInt aSecond

SetYear(TInt)

IMPORT_C TIntSetYear(TIntaYear)

Parameters

TInt aYear

SetYearLeapCheck(TInt)

IMPORT_C TIntSetYearLeapCheck(TIntaYear)

Parameters

TInt aYear

Year()

TInt Year()const [inline]

Gets the year component of the date/time.

A negative value indicates a BC date.

The year

Member Data Documentation

TInt iDay

TInt iDay[private]

TInt iHour

TInt iHour[private]

TInt iMicroSecond

TInt iMicroSecond[private]

TInt iMinute

TInt iMinute[private]

TMonth iMonth

TMonth iMonth[private]

TInt iSecond

TInt iSecond[private]

TInt iYear

TInt iYear[private]