Date/Time class.
More...
#include <datetime.h>
|
enum | TimeZone { local_timezone,
utc_timezone
} |
|
| CL_DateTime () |
| Constructs a date/time object. More...
|
|
| CL_DateTime (int year, int month, int day, int hour=0, int minute=0, int seconds=0, int nanoseconds=0, TimeZone timezone=utc_timezone) |
|
| ~CL_DateTime () |
|
static CL_DateTime | get_current_local_time () |
| Get current system time in local time zone. More...
|
|
static CL_DateTime | get_current_utc_time () |
| Get current system time in UTC. More...
|
|
static CL_DateTime | get_local_time_from_ticks (cl_byte64 ticks) |
| Converts a time tick value (number of 100-nanosecond intervals since January 1, 1601 UTC) to a date time in the local time zone. More...
|
|
static CL_DateTime | get_utc_time_from_ticks (cl_byte64 ticks) |
| Converts a time tick value (number of 100-nanosecond intervals since January 1, 1601 UTC) to a date time in UTC. More...
|
|
static CL_DateTime | from_short_date_string (const CL_String &value) |
|
Enumerator |
---|
local_timezone |
|
utc_timezone |
|
CL_DateTime::CL_DateTime |
( |
) | |
|
Constructs a date/time object.
CL_DateTime::CL_DateTime |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour = 0 , |
|
|
int |
minute = 0 , |
|
|
int |
seconds = 0 , |
|
|
int |
nanoseconds = 0 , |
|
|
TimeZone |
timezone = utc_timezone |
|
) |
| |
CL_DateTime::~CL_DateTime |
( |
) | |
|
static CL_DateTime CL_DateTime::get_current_local_time |
( |
) | |
|
|
static |
Get current system time in local time zone.
static CL_DateTime CL_DateTime::get_current_utc_time |
( |
) | |
|
|
static |
Get current system time in UTC.
unsigned char CL_DateTime::get_day |
( |
) | |
const |
unsigned int CL_DateTime::get_day_of_week |
( |
) | |
const |
Get the day of the week.
- Returns
- 0 = Sunday ... 6 = Saturday
unsigned char CL_DateTime::get_hour |
( |
) | |
const |
Converts a time tick value (number of 100-nanosecond intervals since January 1, 1601 UTC) to a date time in the local time zone.
unsigned char CL_DateTime::get_minutes |
( |
) | |
const |
unsigned char CL_DateTime::get_month |
( |
) | |
const |
Returns the month number in range 1-12.
- Returns
- 1 = Jan ... 12 = December
unsigned int CL_DateTime::get_nanoseconds |
( |
) | |
const |
unsigned char CL_DateTime::get_seconds |
( |
) | |
const |
TimeZone CL_DateTime::get_timezone |
( |
) | |
const |
Converts a time tick value (number of 100-nanosecond intervals since January 1, 1601 UTC) to a date time in UTC.
unsigned short CL_DateTime::get_year |
( |
) | |
const |
bool CL_DateTime::is_null |
( |
) | |
const |
bool CL_DateTime::operator!= |
( |
const CL_DateTime & |
other) | |
const |
bool CL_DateTime::operator< |
( |
const CL_DateTime & |
other) | |
const |
bool CL_DateTime::operator<= |
( |
const CL_DateTime & |
other) | |
const |
bool CL_DateTime::operator== |
( |
const CL_DateTime & |
other) | |
const |
bool CL_DateTime::operator> |
( |
const CL_DateTime & |
other) | |
const |
bool CL_DateTime::operator>= |
( |
const CL_DateTime & |
other) | |
const |
void CL_DateTime::set_date |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour = 0 , |
|
|
int |
minute = 0 , |
|
|
int |
seconds = 0 , |
|
|
int |
nanoseconds = 0 , |
|
|
TimeZone |
timezone = utc_timezone |
|
) |
| |
void CL_DateTime::set_day |
( |
int |
day) | |
|
void CL_DateTime::set_hour |
( |
int |
hour) | |
|
void CL_DateTime::set_minutes |
( |
int |
minutes) | |
|
void CL_DateTime::set_month |
( |
int |
month) | |
|
void CL_DateTime::set_nanoseconds |
( |
int |
nanoseconds) | |
|
void CL_DateTime::set_null |
( |
) | |
|
void CL_DateTime::set_seconds |
( |
int |
seconds) | |
|
void CL_DateTime::set_timezone |
( |
TimeZone |
timezone) | |
|
void CL_DateTime::set_year |
( |
int |
year) | |
|
CL_String CL_DateTime::to_long_date_string |
( |
) | |
const |
CL_String CL_DateTime::to_long_time_string |
( |
) | |
const |
CL_String CL_DateTime::to_short_date_string |
( |
) | |
const |
CL_String CL_DateTime::to_short_datetime_string |
( |
) | |
const |
CL_String CL_DateTime::to_short_time_string |
( |
) | |
const |
Converts the date to the number of 100-nanosecond intervals since January 1, 1601 UTC.
The documentation for this class was generated from the following file: