Ocular Engine
Ocular::Core::DateTime Class Reference

Public Member Functions

 DateTime (int year, int month, int day, int hour, int minute, int second, int millisecond, bool dst=false)
 
 DateTime (std::tm *time, int ms=0)
 
int getYear ()
 
int getMonth ()
 
int getDayOfMonth ()
 
int getDayOfYear ()
 
int getHour ()
 
int getMinute ()
 
int getSecond ()
 
int getMillisecond ()
 
bool getIsDST ()
 

Constructor & Destructor Documentation

Ocular::Core::DateTime::DateTime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
int  millisecond,
bool  dst = false 
)
Note
Only basic sanity-checking is performed (minutes in range [0,59], etc.)
Parameters
year
monthMonth of year [1,12]
dayDay of month [1,31]
hourHour of day [0,23]
minuteMinute of hour [0,59]
secondSecond of minute [0,59]
millisecondMillisecond of minute [0, 999]
dstDaylight Saving Time
Ocular::Core::DateTime::DateTime ( std::tm *  time,
int  ms = 0 
)
Parameters
time
ms

Member Function Documentation

int Ocular::Core::DateTime::getDayOfMonth ( )

Returns day of the month [1,31]

int Ocular::Core::DateTime::getDayOfYear ( )

Returns day of the year [1, 366]

int Ocular::Core::DateTime::getHour ( )

Returns hours since midnight [0, 23]

bool Ocular::Core::DateTime::getIsDST ( )

Returns true if Daylight Saving Time is in effect.

int Ocular::Core::DateTime::getMillisecond ( )

Returns milliseconds after the second [0, 999]

int Ocular::Core::DateTime::getMinute ( )

Returns minutes after the hour [0, 59]

int Ocular::Core::DateTime::getMonth ( )

Returns the month of the year [1,12]

int Ocular::Core::DateTime::getSecond ( )

Returns seconds after the minute [0, 59]

int Ocular::Core::DateTime::getYear ( )

Returns the year


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