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:

hzEcodeAltDay(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.
hzEcodeAltMonth(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.
hzEcodeAltYear(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.
voidClear(void)
uint32_tDay(void)Provide the day value of this date Arguments: None
uint32_tDow(void)
uint32_tExcel(void)
boolIsNull(void)
boolIsSet(void)
uint32_tMonth(void)Provide the month value of this date Arguments: None
uint32_tNoDays(void)
voidSetByEpoch(uint32_t nEpochTime)Set the short date using a epoch time Returns: None
hzEcodeSetDate(hzSDate& op)Set the short date to the supplied short date operand Returns: E_OK
hzEcodeSetDate(uint32_t Y)uint32_t M, uint32_t D, Set the short date by three supplied integers of year, month and day
hzEcodeSetDate(uint32_t nDays)Set the short date by the number of days since the start of the calenda (Jan 1st 0000)
hzEcodeSetDate(const char* cpDateStr)Set the short date by a text string of an acceptable format
voidSysDate(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_tYear(void)Provide the year value of this date Arguments: None

Overloaded operators:

const char*operator const char *(void)
booloperator!(void)
booloperator!=(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
booloperator<(hzSDate& op)
ostream&operator<<(ostream& os)hzSDate& d,
booloperator<=(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)
booloperator==(hzXDate& op)Test if a short date is 'equal' to a long date (ignoring the time in the long date)
booloperator==(hzSDate& op)
booloperator>(hzSDate& op)
booloperator>=(hzSDate& op)

Member Variables:

uint32_tm_daysNo of days since Jan 1, 0000