#include <it_bus/date_time.h>
This class is not derived from IT_Bus::AnySimpleType.
Definition at line 28 of file date_time.h.
Public Member Functions | |
| DateTime () | |
| Default constructor. | |
| DateTime (short wYear, short wMonth, short wDay, short wHour=0, short wMinute=0, short wSecond=0, short wMilliseconds=0) throw ((Exception)) | |
| Constructor. | |
| DateTime (const char *value) throw ((Exception)) | |
| Constructor. | |
| DateTime (const String &value) throw ((Exception)) | |
| Constructor. | |
| DateTime (const DateTime ©) | |
| Copy constructor. | |
| ~DateTime () | |
| Destructor. | |
| DateTime & | operator= (const DateTime &rhs) |
| Assignment operator. | |
| String | to_string () const |
| Returns a string representation of the date. | |
| void | from_string (const String &str) throw ((Exception)) |
| Initializes this instance with the date corresponding to the string argument. | |
| short | getYear () const |
| Returns a numeric value for the year corresponding to the date this instance represents. | |
| void | setYear (short wYear) throw ((Exception)) |
| Sets the value for the year to the numeric value supplied as an argument. | |
| short | getMonth () const |
| Returns a numeric value for the month corresponding to the date this instance represents. | |
| void | setMonth (short wMonth) throw ((Exception)) |
| Sets the value for the month to the numeric value supplied as an argument. | |
| short | getDay () const |
| Returns a numeric value for the day corresponding to the date this instance represents. | |
| void | setDay (short wDay) throw ((Exception)) |
| Sets the value for the day to the numeric value supplied as an argument. | |
| short | getHour () const |
| Returns a numeric value for the hour corresponding to the date this instance represents. | |
| void | setHour (short wHour) throw ((Exception)) |
| Sets the value for the hour to the numeric value supplied as an argument. | |
| short | getMinute () const |
| Returns a numeric value for the minute corresponding to the date this instance represents. | |
| void | setMinute (short wMinute) throw ((Exception)) |
| Sets the value for the minute to the numeric value supplied as an argument. | |
| short | getSecond () const |
| Returns a numeric value for the second corresponding to the date this instance represents. | |
| void | setSecond (short wSecond) throw ((Exception)) |
| Sets the value for the second to the numeric value supplied as an argument. | |
| short | getMilliseconds () const |
| Returns a numeric value for the milliseconds corresponding to the date this instance represents. | |
| void | setMilliseconds (short wMilliseconds) throw ((Exception)) |
| Sets the value for the milliseconds to the numeric value supplied as an argument. | |
| bool | haveUTCTimeZoneOffset () const |
| Returns a bool indicating whether the instance has the UTC time zone offset set. | |
| void | setLocalTimeZone () |
| Set the instance to the local time zone. | |
| void | setUTCTimeZoneOffset (short hour_offset, short minute_offset) throw ((Exception)) |
| Set the UTC time zone offset to the values supplied as arguments. | |
| void | getUTCTimeZoneOffset (short &hour_offset, short &minute_offset) const |
| Obtain the UTC time zone offset values. | |
| bool | operator== (const DateTime &rhs) const |
| Equality operator. | |
| bool | operator!= (const DateTime &rhs) const |
| Inequality operator. | |
| DateTime & | operator+= (const Duration &rhs) throw ((IT_Bus::Exception)) |
| Duration addition with assignment operator. | |
| DateTime & | operator-= (const Duration &rhs) throw ((IT_Bus::Exception)) |
| Duration subtraction with assignment operator. | |
Static Public Member Functions | |
| static DateTime | current () throw ((Exception)) |
| Return a DateTime instance initialized to the current UTC time. | |
Private Attributes | |
| DateTimeImpl * | m_impl |
Friends | |
| class | TimeConverter |
| IT_Bus::DateTime::DateTime | ( | short | wYear, | |
| short | wMonth, | |||
| short | wDay, | |||
| short | wHour = 0, |
|||
| short | wMinute = 0, |
|||
| short | wSecond = 0, |
|||
| short | wMilliseconds = 0 | |||
| ) | throw ((Exception)) |
Constructor.
| wYear | the year, including the century | |
| wMonth | the month (1-12) | |
| wDay | the day of the month | |
| wHour | the hour (0-23). The default is 0 | |
| wMinute | the minute (0-59). The default is 0 | |
| wSecond | the second (0-59). The default is 0 | |
| wMilliseconds | the millisecond (0-999). The default is 0 |
| Exception |
| IT_Bus::DateTime::DateTime | ( | const char * | value | ) | throw ((Exception)) |
| String IT_Bus::DateTime::to_string | ( | ) | const |
Initializes this instance with the date corresponding to the string argument.
| String | representation of the date. |
| short IT_Bus::DateTime::getYear | ( | ) | const |
Returns a numeric value for the year corresponding to the date this instance represents.
| void IT_Bus::DateTime::setYear | ( | short | wYear | ) | throw ((Exception)) |
Sets the value for the year to the numeric value supplied as an argument.
| short | representing the year. |
| short IT_Bus::DateTime::getMonth | ( | ) | const |
Returns a numeric value for the month corresponding to the date this instance represents.
| void IT_Bus::DateTime::setMonth | ( | short | wMonth | ) | throw ((Exception)) |
Sets the value for the month to the numeric value supplied as an argument.
| short | representing the month. |
| short IT_Bus::DateTime::getDay | ( | ) | const |
Returns a numeric value for the day corresponding to the date this instance represents.
| void IT_Bus::DateTime::setDay | ( | short | wDay | ) | throw ((Exception)) |
Sets the value for the day to the numeric value supplied as an argument.
| short | representing the day. |
| short IT_Bus::DateTime::getHour | ( | ) | const |
Returns a numeric value for the hour corresponding to the date this instance represents.
| void IT_Bus::DateTime::setHour | ( | short | wHour | ) | throw ((Exception)) |
Sets the value for the hour to the numeric value supplied as an argument.
| short | representing the hour. |
| short IT_Bus::DateTime::getMinute | ( | ) | const |
Returns a numeric value for the minute corresponding to the date this instance represents.
| void IT_Bus::DateTime::setMinute | ( | short | wMinute | ) | throw ((Exception)) |
Sets the value for the minute to the numeric value supplied as an argument.
| short | representing the minut. |
| short IT_Bus::DateTime::getSecond | ( | ) | const |
Returns a numeric value for the second corresponding to the date this instance represents.
| void IT_Bus::DateTime::setSecond | ( | short | wSecond | ) | throw ((Exception)) |
Sets the value for the second to the numeric value supplied as an argument.
| short | representing the second. |
| short IT_Bus::DateTime::getMilliseconds | ( | ) | const |
Returns a numeric value for the milliseconds corresponding to the date this instance represents.
| void IT_Bus::DateTime::setMilliseconds | ( | short | wMilliseconds | ) | throw ((Exception)) |
Sets the value for the milliseconds to the numeric value supplied as an argument.
| short | representing the milliseconds. |
| bool IT_Bus::DateTime::haveUTCTimeZoneOffset | ( | ) | const |
Returns a bool indicating whether the instance has the UTC time zone offset set.
| void IT_Bus::DateTime::setUTCTimeZoneOffset | ( | short | hour_offset, | |
| short | minute_offset | |||
| ) | throw ((Exception)) |
Set the UTC time zone offset to the values supplied as arguments.
| short | numeric value for the hour offset. | |
| short | numeric value for the minute offset. |
| void IT_Bus::DateTime::getUTCTimeZoneOffset | ( | short & | hour_offset, | |
| short & | minute_offset | |||
| ) | const |
Obtain the UTC time zone offset values.
The values are returned through the method arguments.
| bool IT_Bus::DateTime::operator== | ( | const DateTime & | rhs | ) | const |
Equality operator.
Compares two dates.
| bool IT_Bus::DateTime::operator!= | ( | const DateTime & | rhs | ) | const |
Inequality operator.
Compares two dates.
1.5.1-p1