Structure to hold a date and time. More...
#include <brtimedate.h>
Public Member Functions | |
| BURGER_INLINE void | Clear (void) |
| Zero out all entries. | |
| void | GetTime (void) |
| Obtain the current localized time. | |
| void | GetTime (time_t uInput) |
| Convert a time_t to a TimeDate_t. | |
| void | TimeToString (char *pOutput) const |
| Convert the time to 23:23:21. | |
| void | TimeToStringPM (char *pOutput) const |
| Convert the time to 11:23:21PM. | |
| void | DateToString (char *pOutput) const |
| Convert the date to 10/30/63. | |
| void | DateToStringVerbose (char *pOutput) const |
| Convert the date to Sunday, October 30, 1963. | |
| void | Read (StreamHandle_t *pInput) |
| Read the structure record from a StreamHandle_t. | |
| void | Write (StreamHandle_t *pOutput) const |
| Write the structure record to a StreamHandle_t. | |
| int | Compare (const TimeDate_t *pInput) const |
| Compares two Burger::TimeDate_t records for equality. | |
Public Attributes | |
| Word32 | m_uYear |
| Year "2009". | |
| Word16 | m_usMilliseconds |
| 0-999 | |
| Word8 | m_bMonth |
| 1-12 | |
| Word8 | m_bDay |
| 1-31 | |
| Word8 | m_bDayOfWeek |
| 0-6 | |
| Word8 | m_bHour |
| 0-23 | |
| Word8 | m_bMinute |
| 0-59 | |
| Word8 | m_bSecond |
| 0-59 | |
Friends | |
| BURGER_INLINE friend Word | operator== (const TimeDate_t &rInput1, const TimeDate_t &rInput2) |
| BURGER_INLINE friend Word | operator!= (const TimeDate_t &rInput1, const TimeDate_t &rInput2) |
| BURGER_INLINE friend Word | operator> (const TimeDate_t &rInput1, const TimeDate_t &rInput2) |
| BURGER_INLINE friend Word | operator>= (const TimeDate_t &rInput1, const TimeDate_t &rInput2) |
| BURGER_INLINE friend Word | operator< (const TimeDate_t &rInput1, const TimeDate_t &rInput2) |
| BURGER_INLINE friend Word | operator<= (const TimeDate_t &rInput1, const TimeDate_t &rInput2) |
Structure to hold a date and time.
This structure contains all the information of the date and time in a human readable format
| Burger::TimeDate_t::Clear | ( | void | ) | [inline] |
Zero out all entries.
Initialize all entries to zero. This is considered an error state.
| int Burger::TimeDate_t::Compare | ( | const TimeDate_t * | pInput | ) | const |
Compares two Burger::TimeDate_t records for equality.
Compares two Burger::TimeDate_t records and return -1 if the this is less than the record passed. return 0 if they are the same and 1 if the parameter is less than the this.
| pInput | Pointer to an initialized Burger::TimeDate_t record. |
| void Burger::TimeDate_t::DateToString | ( | char * | pOutput | ) | const |
Convert the date to 10/30/63.
Convert the date into a string that is in the format of MM/DD/YY
| pOutput | C char buffer at least 9 bytes long to receive the string. |
| void Burger::TimeDate_t::DateToStringVerbose | ( | char * | pOutput | ) | const |
Convert the date to Sunday, October 30, 1963.
Convert the date into a string that is in the format of "Sunday, October 30, 1963"
| pOutput | C char buffer at least 64 bytes long to receive the string. |
| void Burger::TimeDate_t::GetTime | ( | void | ) |
Obtain the current localized time.
A query is made to the target platform and the structure is filled in with the current date and time.
| void Burger::TimeDate_t::GetTime | ( | time_t | uInput | ) |
Convert a time_t to a TimeDate_t.
A query is made to the target platform and the structure is filled in with the current date and time.
| uInput | A time_t value obtained by a call to the "C library. \return The structure is filled with the time as converted from the "C" library time. |
| void Burger::TimeDate_t::Read | ( | StreamHandle_t * | pInput | ) |
Read the structure record from a StreamHandle_t.
Initialize a Burger::TimeDate_t structure from a StreamHandle_t record. The data will be read from what was stored from a call to Burger::TimeDate_t::Write(StreamHandle_t *) const . It will read the data back irregardless of platform.
This call is endian neutral and assumes the Burger::TimeDate_t is uninitialized.
| pInput | Pointer to a valid StreamHandle_t structure initialized for input |
| void Burger::TimeDate_t::TimeToString | ( | char * | pOutput | ) | const |
Convert the time to 23:23:21.
Convert the time into a string that is in the format of HH:MM:SS. Uses a 24 hour (Military time) format.
| pOutput | C char buffer at least 9 bytes long to receive the string. |
| void Burger::TimeDate_t::TimeToStringPM | ( | char * | pOutput | ) | const |
Convert the time to 11:23:21PM.
Convert the time into a string that is in the format of HH:MM:SSAM Uses a 12 hour (AM/PM) format.
| pOutput | C char buffer at least 11 bytes long to receive the string. |
| void Burger::TimeDate_t::Write | ( | StreamHandle_t * | pOutput | ) | const |
Write the structure record to a StreamHandle_t.
Take the contents of a Burger::TimeDate_t structure and write it out to a StreamHandle_t record. The data will be written so a call to Burger::TimeDate_t::Read(StreamHandle_t *) will read the data back irregardless of platform.
This call is endian neutral and assumes the Burger::TimeDate_t is initialized.
| pOutput | Pointer to a valid StreamHandle_t structure initialized for output |
| BURGER_INLINE friend Word operator!= | ( | const TimeDate_t & | rInput1, | |
| const TimeDate_t & | rInput2 | |||
| ) | [friend] |
| BURGER_INLINE friend Word operator< | ( | const TimeDate_t & | rInput1, | |
| const TimeDate_t & | rInput2 | |||
| ) | [friend] |
| BURGER_INLINE friend Word operator<= | ( | const TimeDate_t & | rInput1, | |
| const TimeDate_t & | rInput2 | |||
| ) | [friend] |
| BURGER_INLINE friend Word operator== | ( | const TimeDate_t & | rInput1, | |
| const TimeDate_t & | rInput2 | |||
| ) | [friend] |
| BURGER_INLINE friend Word operator> | ( | const TimeDate_t & | rInput1, | |
| const TimeDate_t & | rInput2 | |||
| ) | [friend] |
| BURGER_INLINE friend Word operator>= | ( | const TimeDate_t & | rInput1, | |
| const TimeDate_t & | rInput2 | |||
| ) | [friend] |
Year "2009".
1.7.1