Inheritance diagram for os::DateTime:
Public Member Functions | |
DateTime () | |
Default constructor. | |
DateTime (const DateTime &cDateTime) | |
Copy constructor. | |
DateTime (const String &cTime) | |
Constructor: string. | |
DateTime (struct tm *psTime) | |
Constructor: struct tm. | |
DateTime (int nTime) | |
Constructor: Unix Epoch. | |
DateTime (int nYear, int nMonth, int nDay) | |
Constructor: Date. | |
DateTime (int nHour, int nMin, int nSec, int nUSec) | |
Constructor: Time. | |
~DateTime () | |
int | GetDay () const |
Get day of month. | |
int | GetMonth () const |
Get month of year. | |
int | GetYear () const |
Get year. | |
int | GetHour () const |
Get hours. | |
int | GetMin () const |
Get minutes. | |
int | GetSec () const |
Get seconds. | |
int | GetUSec () const |
int | GetDayOfWeek () const |
double | GetDaycount () const |
Get number of days. | |
double | GetJulianDate () const |
Get Julian date. | |
time_t | GetEpoch () const |
Get Unix Epoch. | |
String | GetDate () const |
void | SetTime (int nHour, int nMin, int nSec, int nUSec) |
Set time value. | |
void | SetDate (int nYear, int nMonth, int nDay) |
Set date value. | |
bool | SetDate (const String &cDate) |
bool | IsValid () const |
Check if date is valid. | |
DateTime & | operator= (const DateTime &cTime) |
Assign a DateTime value. | |
DateTime | operator+ (const DateTime &cTime) const |
Add a DateTime value. | |
DateTime | operator+ (double vDays) const |
Add a number of days to date. | |
DateTime | operator- (const DateTime &cTime) const |
Subtract a DateTime value. | |
DateTime | operator- (double vDays) const |
Subtract a number of days from date. | |
DateTime & | operator+= (const DateTime &cTime) |
Add a DateTime value. | |
DateTime & | operator+= (double vDays) |
Add a number of days to date. | |
DateTime & | operator-= (const DateTime &cTime) |
Subtract a DateTime value. | |
DateTime & | operator-= (double vDays) |
Subtract a number of days from date. | |
int | operator== (const DateTime &cTime) const |
Compare dates. | |
int | operator!= (const DateTime &cTime) const |
Compare dates. | |
int | operator< (const DateTime &cTime) const |
Compare dates. | |
int | operator> (const DateTime &cTime) const |
Compare dates. | |
operator time_t () const | |
operator std::string () const | |
operator os::String () const | |
virtual size_t | GetFlattenedSize (void) const |
virtual status_t | Flatten (uint8 *pBuffer, size_t nSize) const |
virtual status_t | Unflatten (const uint8 *pBuffer) |
virtual int | GetType (void) const |
Static Public Member Functions | |
static DateTime | Now () |
Get current date and time. | |
Classes | |
class | Private |
DateTime cToday = DateTime::Now(); DateTime cTomorrow = cToday + 24.0; DateTime cLastYear = cToday - DateTime( 1, 0, 0 ); double vNumberOfDays = ( cToday - DateTime( 2003, 8, 30 ) ).GetDaycount();
DateTime::DateTime | ( | ) |
DateTime::DateTime | ( | const DateTime & | cDateTime | ) |
DateTime::DateTime | ( | struct tm * | psTime | ) |
DateTime::DateTime | ( | int | nTime | ) |
DateTime::DateTime | ( | int | nYear, | |
int | nMonth, | |||
int | nDay | |||
) |
DateTime::DateTime | ( | int | nHour, | |
int | nMin, | |||
int | nSec, | |||
int | nUSec | |||
) |
DateTime::~DateTime | ( | ) |
int DateTime::GetDay | ( | ) | const |
int DateTime::GetMonth | ( | ) | const |
int DateTime::GetYear | ( | ) | const |
int DateTime::GetHour | ( | ) | const |
int DateTime::GetMin | ( | ) | const |
int DateTime::GetSec | ( | ) | const |
int os::DateTime::GetUSec | ( | ) | const |
int DateTime::GetDayOfWeek | ( | ) | const |
double DateTime::GetDaycount | ( | ) | const |
double DateTime::GetJulianDate | ( | ) | const |
time_t DateTime::GetEpoch | ( | ) | const |
String DateTime::GetDate | ( | ) | const |
void DateTime::SetTime | ( | int | nHour, | |
int | nMin, | |||
int | nSec, | |||
int | nUSec | |||
) |
void DateTime::SetDate | ( | int | nYear, | |
int | nMonth, | |||
int | nDay | |||
) |
bool DateTime::SetDate | ( | const String & | cDate | ) |
bool DateTime::IsValid | ( | ) | const |
DateTime DateTime::Now | ( | ) | [static] |
DateTime DateTime::operator+ | ( | double | vDays | ) | const |
DateTime DateTime::operator- | ( | double | vDays | ) | const |
DateTime & DateTime::operator+= | ( | double | vDays | ) |
DateTime & DateTime::operator-= | ( | double | vDays | ) |
int DateTime::operator== | ( | const DateTime & | cTime | ) | const |
int DateTime::operator!= | ( | const DateTime & | cTime | ) | const |
int DateTime::operator< | ( | const DateTime & | cTime | ) | const |
int DateTime::operator> | ( | const DateTime & | cTime | ) | const |
os::DateTime::operator time_t | ( | ) | const [inline] |
os::DateTime::operator std::string | ( | ) | const [inline] |
os::DateTime::operator os::String | ( | ) | const [inline] |
size_t DateTime::GetFlattenedSize | ( | void | ) | const [virtual] |
Implements os::Flattenable.
status_t DateTime::Flatten | ( | uint8 * | pBuffer, | |
size_t | nSize | |||
) | const [virtual] |
Implements os::Flattenable.
status_t DateTime::Unflatten | ( | const uint8 * | pBuffer | ) | [virtual] |
Implements os::Flattenable.
int DateTime::GetType | ( | void | ) | const [virtual] |
Implements os::Flattenable.