Date and Time together according to ISO 8601.. More...
Public Member Methods | |
DateTime () | |
Default constructor. More... | |
DateTime (TimeStamp timeStamp) | |
Explicit convertion from TimeStamp. More... | |
DateTime (const String &text) | |
Explicit convertion from String. More... | |
DateTime (Int32 year, Month month, Int32 day, Int32 hour, Int32 minute, Int32 second=0, Int32 millisecond=0, Int32 microsecond=0) | |
Default constructor. More... | |
DateTime (const Date &Date) | |
Constructor of DateTime that use a Date. More... | |
DateTime (const Date &Date, const Time &Time) | |
Constructor of DateTime that use a Date and a Time. More... | |
void | SetDateTime (Int32 year, Month month, Int32 day, Int32 hour, Int32 minute, Int32 second=0, Int32 millisecond=0, Int32 microsecond=0) |
Sets a date time. More... | |
void | GetDateTime (Int32 &year, Month &month, Int32 &day, Int32 &hour, Int32 &minute, Int32 &second, Int32 &millisecond, Int32 µsecond) |
Gets a date time. More... | |
Int32 | GetYear () const |
Gets the year. More... | |
Month | GetMonth () const |
Gets the month. More... | |
Int32 | GetDay () const |
Gets the day. More... | |
Int32 | GetHour () const |
Gets the hour part of DateTime structure. More... | |
Int32 | GetMinute () const |
Gets the minute part of DateTime structure. More... | |
Int32 | GetSecond () const |
Gets the second part of DateTime structure. More... | |
Int32 | GetMillisecond () const |
Gets the millisecond part of DateTime structure. More... | |
Int32 | GetMicrosecond () const |
Gets the microsecond part of DateTime structure. More... | |
const Date | GetDate () const |
Gets the date. More... | |
const Time | GetTime () const |
Gets the time. More... | |
void | SetDate (const Date &Date) |
Sets a date. More... | |
void | SetTime (const Time &Time) |
Sets a time. More... | |
void | ConvertFrom (PCChar8 text) |
Convert from. More... | |
void | ConvertTo (BaseStaticString &text) const |
Convert to. More... | |
String | ToString (bool useTSeparator) const |
Convert this object into a string representation. More... | |
TimeStamp | ToTimeStamp () const |
Converts this object to a TimeSpan. More... | |
DateTime & | operator+= (const TimeSpan &timeSpan) |
Addition assignment operator. More... | |
DateTime & | operator-= (const TimeSpan &timeSpan) |
Subtraction assignment operator. More... | |
DateTime | ( | ) |
Default constructor.
Explicit convertion from TimeStamp.
timeStamp | The time stamp. |
Explicit convertion from String.
text | The text that contains the DateTime value. ("2012-03-03 14:48:59" or "2012-03-03T14:48:59") |
DateTime | ( | Int32 | year, |
Month | month, | ||
Int32 | day, | ||
Int32 | hour, | ||
Int32 | minute, | ||
Int32 | second = 0 , |
||
Int32 | millisecond = 0 , |
||
Int32 | microsecond = 0 |
||
) |
Default constructor.
year | The year. |
month | The month. |
day | The day. |
hour | The hour. |
minute | The minute. |
second | (optional) the second. |
millisecond | (optional) the millisecond. |
microsecond | (optional) the microsecond. |
|
virtual |
Convert from.
text | The text that contains the DateTime value. ("2012-03-03 14:48:59" or "2012-03-03T14:48:59") |
Implements IStringConvertible.
|
virtual |
const Date GetDate | ( | ) | const |
Gets the date.
void GetDateTime | ( | Int32 & | year, |
Month & | month, | ||
Int32 & | day, | ||
Int32 & | hour, | ||
Int32 & | minute, | ||
Int32 & | second, | ||
Int32 & | millisecond, | ||
Int32 & | microsecond | ||
) |
Gets a date time.
year | [in,out] The year. |
month | [in,out] The month. |
day | [in,out] The day. |
hour | [in,out] The hour. |
minute | [in,out] The minute. |
second | [in,out] (optional) the second. |
millisecond | [in,out] (optional) the millisecond. |
microsecond | [in,out] (optional) the microsecond. |
Int32 GetDay | ( | ) | const |
Gets the day.
Int32 GetMicrosecond | ( | ) | const |
Gets the microsecond part of DateTime structure.
Int32 GetMillisecond | ( | ) | const |
Gets the millisecond part of DateTime structure.
Month GetMonth | ( | ) | const |
Gets the month.
const Time GetTime | ( | ) | const |
Gets the time.
Int32 GetYear | ( | ) | const |
Gets the year.
Addition assignment operator.
timeSpan | The time span. |
Subtraction assignment operator.
timeSpan | The time span. |
void SetDateTime | ( | Int32 | year, |
Month | month, | ||
Int32 | day, | ||
Int32 | hour, | ||
Int32 | minute, | ||
Int32 | second = 0 , |
||
Int32 | millisecond = 0 , |
||
Int32 | microsecond = 0 |
||
) |
Sets a date time.
year | The year. |
month | The month. |
day | The day. |
hour | The hour. |
minute | The minute. |
second | (optional) the second. |
millisecond | (optional) the millisecond. |
microsecond | (optional) the microsecond. |
String ToString | ( | bool | useTSeparator | ) | const |
Convert this object into a string representation.
useTSeparator | Use 'T' as separator. |