gmSCDateTimeClass
- Mark Juras
Owned by Mark Juras
The DateTime Service Class
The service class DateTime obtains the current date and time from the operating system and converts them into a form that can be used for comparisons and arithmetic. In this context date values are stored as Julian days since a specified start date, Dec 31,1967 by default, and time values are stored as seconds since midnight. Note that since time is only expressed in seconds no special operating system calls are needed to obtain it.The method DateTime_GetDateAndTime
Prototypevoid DateTime_GetDateAndTime(int* DateValue,int* TimeValue);
Parameter | Description |
DateValue | returns the current date in standard form as described above. |
TimeValue | returns the current local time in standard form as described above. |
The method DateTime_JulianToDate
Prototypevoid DateTime_JulianToDate(int Julian,int* Day,int* Month,int* Year);
Parameter | Description |
Julian | Specifies the relative Julian value for which the date value is desired. |
Day | returns the day value, 1..31, of the decomposed date value. |
Month | returns the month value, 1..12, of the decomposed date value. |
Year | returns the year value of the decomposed date value. |
The method DateTime_ToJulian
Prototypeint DateTime_ToJulian(int day,int month,int year);
Parameter | Description |
day | Specifies the day value of the date. |
month | Specifies the month value of the date. |
year | Specifies the year value of the date. |
The method returns the number of days that have passed since the specified start date.
Table of Contents