Defined in file: hzDate.h
A full date and time accurate to microseconds (8 bytes)
Constructors/Detructors
| hzXDate* | hzXDate | (void) | |
| void | ~hzXDate | (void) |
Public Methods:
| uint32_t | AsEpoch | (void) | Return the time & date as an epoch Arguments: None |
| uint64_t | AsVal | (void) | Return the day of month part from this hzXDate Arguments: None |
| void | Clear | (void) | |
| hzSDate | Date | (void) | Extract the date part of the full dte and time as hzSDate (short form date) instance Arguments: None |
| uint32_t | Day | (void) | Return the day of month part from this hzXDate Arguments: None |
| uint32_t | DaysInYear | (void) | Arguments: None |
| uint32_t | Dow | (void) | |
| uint32_t | Excel | (void) | |
| uint32_t | Hour | (void) | |
| bool | IsNull | (void) | |
| bool | IsSet | (void) | |
| uint32_t | Min | (void) | |
| uint32_t | Month | (void) | Return the month part from this hzXDate Arguments: None |
| uint32_t | NoDays | (void) | |
| uint32_t | NoSecs | (void) | |
| uint32_t | Sec | (void) | |
| void | SetByEpoch | (uint32_t nEpochTime) | Set the date and time components of this hzXDate using the epoch time (number of seconds since midnight , Jan 1 1970) Returns: None |
| void | SetByEpoch | (uint32_t nEpochTime)uint32_t usec, | Set the date and time components of this hzXDate using the epoch time (number of seconds since midnight , Jan 1 1970). Also set the number of microseconds Returns: None |
| hzEcode | SetDate | (hzXDate& op) | |
| hzEcode | SetDate | (hzSDate& D) | |
| hzEcode | SetDate | (uint32_t Y)uint32_t M, uint32_t D, | Set the date component of this hzXDate instance by three numeric arguments of Y, M and D |
| hzEcode | SetDate | (uint32_t nDays) | Set the date component of this hzXDate instance by number of days since Jan 1 0000 |
| hzEcode | SetDate | (uint32_t nDays)uint32_t nSecs, | Set the date and time components of this hzXDate as two numeric arguments, the number of days since Jan 1 0000 and the number of seconds since midnight. |
| hzEcode | SetDate | (uint64_t xdVal) | Set the date and time components of this hzXDate by a single 64-bit value. This function is provided in order to retrieve dates from repositories in the HadronZoo Database Suite which stores full dates as 64 bit unsigned numbers. |
| hzEcode | SetDate | (const char* cpDateStr) | Set the date component of this hzXDate instance by a text string of an acceptable format |
| hzEcode | SetDateTime | (const char* i) | Set both the date and time components of this hzXDate instance by a text string of an acceptable format |
| hzEcode | SetTime | (hzTime& T) | |
| hzEcode | SetTime | (const char* i) | Set the time component of this hzXDate using a string representation of the time. Allowed formats are hh:mm:ss, hh:mm and hhmmss |
| hzEcode | SetTime | (uint32_t h)uint32_t m, uint32_t s, | Set the time component of this hzXDate to time supplied as hours, minutes and seconds |
| hzEcode | SetTime | (uint32_t nSecs) | Set the time component of this hzXDate to time supplied as number of seconds since midnight |
| void | SysDateTime | (void) | Set this hzXDate instance by the system clock Arguments: None Returns: None |
| hzTime | Time | (void) | Extract the time part of the full data and time as a hzTime instance Arguments: None |
| const char* | Txt | (hzDateFmt eFmt) | Write the date and time 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) | Return the year part from this hzXDate Arguments: None |
| void | altdate | (hzInterval unit)int32_t nounits, | Alter this hzXDate by a number of units which may be either days, months, years, hours, minutes or seconds Returns: None |
| void | altday | (int32_t nounits) | Advance or retard a hzXDate by a number of days. Returns: None |
| void | althour | (int32_t nounits) | Advance or retard a hzXDate by a number of hours. This will alter the day date if the alteration is sufficient to cross one or more midnight boundaries. Returns: None |
| void | altmin | (int32_t nounits) | Advance or retard a hzXDate by a number of minutes. This will alter the day date if the alteration is sufficient to cross one or more midnight boundaries. Returns: None |
| void | altmon | (int32_t nounits) | Advance or retard a hzXDate by a number of months. Returns: None |
| void | altsec | (int32_t units) | Advance or retard a hzXDate by a number of seconds. This will alter the day date if the alteration is sufficient to cross one or more midnight boundaries. Returns: None |
| void | altyear | (int32_t nounits) | Advance or retard a hzXDate by a number of years. Returns: None |
| int32_t | datecmp | (hzXDate& a)hzXDate& b, | Compare two hzXDate instances, A and B. Return 1 if A>B, -1 if A<B and 0 if A and B are equal |
| uint32_t | uSec | (void) |
Overloaded operators:
| const char* | operator const char * | (void) | |
| bool | operator! | (void) | |
| bool | operator!= | (hzXDate& op) | Return true if the operand hzXDate is not the same as this |
| const char* | operator* | (void) | |
| hzXDate& | operator+= | (uint32_t nDays) | Add to this date the supplied number of days |
| hzXDate& | operator-= | (uint32_t nDays) | Subtract from this date the supplied number of days |
| bool | operator< | (hzXDate& op) | Return true if this hzXDate is earlier than the operand |
| ostream& | operator<< | (ostream& os)hzXDate& Date, | |
| bool | operator<= | (hzXDate& op) | Return true if this hzXDate is earlier than or the same as the operand |
| hzXDate& | operator= | (hzXDate& op) | |
| hzXDate& | operator= | (hzSDate& op) | |
| hzXDate& | operator= | (uint64_t xdVal) | |
| hzXDate& | operator= | (hzString& S) | |
| hzXDate& | operator= | (const char* s) | |
| bool | operator== | (hzXDate& op) | Return true if the operand hzXDate is the same as this |
| bool | operator> | (hzXDate& op) | Return true if this hzXDate is later than the operand |
| bool | operator>= | (hzXDate& op) | Return true if this hzXDate is later than or the same as the operand |
Member Variables:
| uint32_t | m_hour | no of hours since midnight 0000/01/01 | |
| uint32_t | m_usec | no of microseconds since start of hour |