Public Member Functions | |
OFDateTime () | |
default constructor. | |
OFDateTime (const OFDateTime &dateTime) | |
copy constructor | |
OFDateTime (const OFDate &dateVal, const OFTime &timeVal) | |
copy constructor | |
virtual | ~OFDateTime () |
destructor | |
virtual OFDateTime & | operator= (const OFDateTime &dateTime) |
assignment operator | |
virtual OFBool | operator== (const OFDateTime &dateTime) const |
comparison operator (equal). | |
virtual OFBool | operator!= (const OFDateTime &dateTime) const |
comparison operator (unequal) Please note that the time values are first transformed to the Coordinated Universal Time (UTC) before they are compared. | |
virtual void | clear () |
reset the date/time value. | |
virtual OFBool | isValid () const |
check whether the currently stored date and time value is valid. | |
OFBool | setDateTime (const unsigned int year, const unsigned int month, const unsigned int day, const unsigned int hour, const unsigned int minute, const double second, const double timeZone=0) |
set the date/time value. | |
OFBool | setDate (const OFDate &dateVal) |
set the date component to the specified date. | |
OFBool | setTime (const OFTime &timeVal) |
set the time component to the specified time. | |
OFBool | setCurrentDateTime () |
set the date and time value to the current system date and time. | |
OFBool | setISOFormattedDateTime (const OFString &formattedDateTime) |
set the date/time value to the given ISO formatted date/time string. | |
const OFDate & | getDate () const |
get the current date component | |
const OFTime & | getTime () const |
get the current time component | |
OFBool | getISOFormattedDateTime (OFString &formattedDateTime, const OFBool showSeconds=OFTrue, const OFBool showFraction=OFFalse, const OFBool showTimeZone=OFFalse, const OFBool showDelimiter=OFTrue) const |
get the current date/time value in ISO format. | |
OFBool | getISOFormattedDateTime (OFString &formattedDateTime, const OFBool showSeconds, const OFBool showFraction, const OFBool showTimeZone, const OFBool showDelimiter, const OFString &dateTimeSeparator) const |
get the current date/time value in ISO format. | |
Static Public Member Functions | |
static OFDateTime | getCurrentDateTime () |
get the current system date and time | |
Private Attributes | |
OFDate | Date |
currently stored date value | |
OFTime | Time |
currently stored time value |
Definition at line 50 of file ofdatime.h.
|
default constructor. Initializes Date and Time to 0. |
|
copy constructor
|
|
copy constructor
|
|
reset the date/time value. Sets all date and all time components to '0'. NB: Date becomes invalid. |
|
get the current system date and time
|
|
get the current date component
|
|
get the current date/time value in ISO format. Same as above but allows to specify the separator between date and time value. Only required since Sun CC 2.0.1 compiler does not support default parameter values for "complex types" like OFString. Reports the error message: "Sorry not implemented" :-/
|
|
get the current date/time value in ISO format. The two ISO time formats supported by this function are
|
|
get the current time component
|
|
check whether the currently stored date and time value is valid. See classes OFDate and OFTime for details.
|
|
comparison operator (unequal) Please note that the time values are first transformed to the Coordinated Universal Time (UTC) before they are compared. However, the special case that there is an "overflow" from one day to another is currently not handled.
|
|
assignment operator
|
|
comparison operator (equal). Please note that the time values are first transformed to the Coordinated Universal Time (UTC) before they are compared. However, the special case that there is an "overflow" from one day to another is currently not handled.
|
|
set the date and time value to the current system date and time. This function uses operating system dependent routines. If the date or time function (or both) are unavailable for some reason the corresponding value is not modified.
|
|
set the date component to the specified date. Before the new value is set it is checked using the "isValid()" routine.
|
|
set the date/time value. Before the new value is set it is checked using the "isValid()" routine.
|
|
set the date/time value to the given ISO formatted date/time string. The two ISO date/time formats supported by this function are
|
|
set the time component to the specified time. Before the new value is set it is checked using the "isValid()" routine.
|