diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-B1DD21A3-674A-5193-95CF-F533FDBBD319.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-B1DD21A3-674A-5193-95CF-F533FDBBD319.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,45 @@ + + + + + +Using +Date and Time HandlingExplains how to manipulate Date and Time. +

Points in time are stored and manipulated using the TTime class. TTime uses +a 64-bit integer to represent time as the number of microseconds since midnight +on 1st January 0 AD, using a nominal Gregorian calendar. This gives a possible +range of 580,000 years.

+

The date/time and its individual components may be set and retrieved using +the TDateTime class. TDateTime is the human +readable form of TTime. It is provided to allow easy user +access to the year, month, day, hour, minute, second and microsecond components +of the time. It does not support manipulation of the date/time, or of its +components, but may be converted into a TTime, and vice versa.

+

Intervals between points in time are represented by the classes derived +from TTimeIntervalBase and by class TTimeIntervalMicroSeconds. +Time intervals can be added or subtracted, either to or from each other or +to or from points in time. Time interval classes exist because adding two +points in time or subtracting one point in time from another is not possible.

+

The Time class is a collection of time related utility +functions; for example, functions that check for leap years and return the +number of days in the month.

+
Arithmetic operations

Care should be taken when +performing arithmetic operations on TTime s especially when +dealing with the last day in the month. For example:

    +
  • adding one month to +October 18th adds 31 days

  • +
  • adding one month to +November 18th adds 30 days

  • +
  • adding one year to February +29th, 1996 gives Feb 28th, 1997

  • +
  • adding one month to +March 31st gives April 30th but subtracting one month from April 30th gives +March 30th

  • +
+
\ No newline at end of file