Path: /sdk/add_on/datetime/
The CDateTime
class provides a way for scripts to get the system date and time.
Register the type with the RegisterScriptDateTime(asIScriptEngine*)
function.
class datetime { datetime(); datetime(const datetime &in other);
datetime &opAssign(const datetime &in other);
uint get_year() const; uint get_month() const; uint get_day() const; uint get_hour() const; uint get_minute() const; uint get_second() const; }
datetime()
datetime(const datetime &in other)
The default constructor initializes the object with the current system time.
The copy constructor copĂes the content of the other object.
datetime &opAssign(const datetime &in other)
The assignment operator copies the content of the other object.
uint get_year() const
Returns the year of the date stored in the object.
uint get_month() const
Returns the month of the date stored in the object. The range is 1 to 12, i.e. 1 is January, 12 is December, and so on.
uint get_day() const
Returns the day of the month of the date stored in the object.
uint get_hour() const
Returns the hour of the time stored in the object. The range is 0 to 23.
uint get_minute() const
Returns the minute of the time stored in the object. The range is 0 to 59.
uint get_second() const
Returns the second of the time stored in the object. The range is 0 to 59.