Defined in file: hzDate.h
hzSDate is a data type capable of representing a date. It comprises a single 32 bit variable whose value is the number of days since 'the Birth of Christ' or Jan 1st, year 0.
Constructors/Detructors
| hzSDate* | hzSDate | (void) | |
| void | ~hzSDate | (void) |
Public Methods:
| hzEcode | AltDay | (int32_t interval) | Alter this short date by a number of days into future/past. The changed value will not be assumed if it amounts to an out of range date. |
| hzEcode | AltMonth | (int32_t interval) | Alter this short date by a number of months into future/past. The changed value will not be assumed if it amounts to an out of range date. |
| hzEcode | AltYear | (int32_t interval) | Alter this short date by a number of years into future/past. The changed value will not be assumed if it amounts to an out of range date. |
| void | Clear | (void) | |
| uint32_t | Day | (void) | Provide the day value of this date Arguments: None |
| uint32_t | Dow | (void) | |
| uint32_t | Excel | (void) | |
| bool | IsNull | (void) | |
| bool | IsSet | (void) | |
| uint32_t | Month | (void) | Provide the month value of this date Arguments: None |
| uint32_t | NoDays | (void) | |
| void | SetByEpoch | (uint32_t nEpochTime) | Set the short date using a epoch time Returns: None |
| hzEcode | SetDate | (hzSDate& op) | Set the short date to the supplied short date operand Returns: E_OK |
| hzEcode | SetDate | (uint32_t Y)uint32_t M, uint32_t D, | Set the short date by three supplied integers of year, month and day |
| hzEcode | SetDate | (uint32_t nDays) | Set the short date by the number of days since the start of the calenda (Jan 1st 0000) |
| hzEcode | SetDate | (const char* cpDateStr) | Set the short date by a text string of an acceptable format |
| void | SysDate | (void) | Set a short date by the system clock Arguments: None Returns: None |
| const char* | Txt | (hzDateFmt eFmt) | Write the date as per the supplied format. The options are:- 1) As YYYYMMDD 2) As dayname, monthname day year (American) 3) As dayname, day monthname year (International) Pointer to buffer populated with the date in text form. Note: The space required is allocated from the thread scratch pad and must not be deleted by the calling function. |
| uint32_t | Year | (void) | Provide the year value of this date Arguments: None |
Overloaded operators:
| const char* | operator const char * | (void) | |
| bool | operator! | (void) | |
| bool | operator!= | (hzSDate& op) | |
| const char* | operator* | (void) | |
| hzSDate& | operator+= | (uint32_t nDays) | Add to this date, the supplied number of days |
| hzSDate& | operator-= | (uint32_t nDays) | Subtract from this date, the supplied number of days |
| bool | operator< | (hzSDate& op) | |
| ostream& | operator<< | (ostream& os)hzSDate& d, | |
| bool | operator<= | (hzSDate& op) | |
| hzSDate& | operator= | (hzXDate& op) | Set a short date to the date component of a full date/time. |
| hzSDate& | operator= | (hzSDate& op) | |
| hzSDate& | operator= | (uint32_t nDays) | |
| hzSDate& | operator= | (const char* cpDate) | |
| hzSDate& | operator= | (hzString& S) | |
| bool | operator== | (hzXDate& op) | Test if a short date is 'equal' to a long date (ignoring the time in the long date) |
| bool | operator== | (hzSDate& op) | |
| bool | operator> | (hzSDate& op) | |
| bool | operator>= | (hzSDate& op) |
Member Variables:
| uint32_t | m_days | No of days since Jan 1, 0000 |