ccgl::utils_time::DateTime Struct Reference

A type representing the combination of date and time. More...

#include <utils_time.h>

Public Member Functions

 DateTime ()
 Create an empty date time value.
 
DateTime ToLocalTime ()
 Convert the UTC time to the local time.
 
DateTime ToUTCTime ()
 Convert the local time to the UTC time.
 
DateTime Forward (int imilliseconds)
 Move forward by the delta in milliseconds.
 
DateTime Backward (int imilliseconds)
 Move backward by the delta in milliseconds.
 
bool operator== (const DateTime &value) const
 
bool operator!= (const DateTime &value) const
 
bool operator< (const DateTime &value) const
 
bool operator<= (const DateTime &value) const
 
bool operator> (const DateTime &value) const
 
bool operator>= (const DateTime &value) const
 

Static Public Member Functions

static DateTime LocalTime ()
 Get the current local time.
 
static DateTime UTCTime ()
 Get the current UTC time.
 
static DateTime FromDateTime (int iyear, int imonth, int iday, int ihour=0, int iminute=0, int isecond=0, int imillisecond=0)
 Create a date time value from each time element value.
 
static DateTime FromFileTime (vuint64_t ifiletime)
 Create a date time value from FILETIME.
 

Public Attributes

int year
 Year.
 
int month
 Month since January - [1, 12].
 
int day
 Day of the month - [1, 31].
 
int day_of_week
 Day of the week since Sunday - [0, 6].
 
int day_of_year
 Day of the year - [0, 365].
 
int hour
 Hour of the day since midnight - [0, 23].
 
int minute
 Minutes after the hour - [0, 59].
 
int second
 Seconds after the minute - [0, 59].
 
int milliseconds
 Milliseconds after the second - [0, 999].
 
vuint64_t total_milliseconds
 Total milliseconds of the time.
 
vuint64_t filetime
 The number of 100-nanosecond intervals since January 1, 1601 (UTC).
 

Detailed Description

A type representing the combination of date and time.

Refers to the DateTime struct implemented in Vlpp by vczh.


The documentation for this struct was generated from the following files: