Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents an instant in time within the modern calendar. More...
#include <omDate.h>
Public Member Functions | |
Date () | |
Create a date object that represents the current date. More... | |
Date (const Time &time) | |
Create a date corresponding to the specified Time offset since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). More... | |
Date (Int64 newYear, const Month &newMonth, const Day &newDay) | |
Create a date corresponding to the specified year, month, and day, at the first instant of the day. More... | |
Date (Int64 newYear, const Month &newMonth, const Day &newDay, const TimeOfDay &newTimeOfDay) | |
Create a date corresponding to the specified year, month, day, and time of day. More... | |
Int64 | getYear () const |
Return the year of this date. Values are interpreted as relative to the year 0 AD. More... | |
void | setYear (Int64 newYear) |
Set the year of this date. Values are interpreted as relative to the year 0 AD. More... | |
const Month & | getMonth () const |
Return a reference to an object that represents the month of this date. More... | |
void | setMonth (const Month &newMonth) |
Set the month of this date. More... | |
const Day & | getDay () const |
Return a reference to an object that represents the day of this date. More... | |
void | setDay (const Day &newDay) |
Set the day of this date. More... | |
const TimeOfDay & | getTimeOfDay () const |
Return a reference to an object that represents the time of day of this date. More... | |
void | setTimeOfDay (const TimeOfDay &newTimeOfDay) |
Set the time of day of this date. More... | |
void | setTime (const Time &newTime) |
Reset the date to the specified Time offset since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). More... | |
data::String | toString () const |
Convert the Date object to a String representation. More... | |
operator data::String () const | |
Convert the Date object to a String representation. More... | |
Static Public Member Functions | |
static Int | getTimeZone () |
Get the current time zone that dates are being processed as being in. More... | |
static Int | getLocalTimeZone () |
Get the local time zone. More... | |
static void | setTimeZone (Int newTimeZone) |
Set the time zone to use when computing the hour of the day. More... | |
A class that represents an instant in time within the modern calendar.
om::time::Date::Date | ( | ) |
Create a date object that represents the current date.
om::time::Date::Date | ( | const Time & | time | ) |
Create a date corresponding to the specified Time offset since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
Create a date corresponding to the specified year, month, and day, at the first instant of the day.
|
inline |
Create a date corresponding to the specified year, month, day, and time of day.
|
inline |
Return the year of this date. Values are interpreted as relative to the year 0 AD.
|
inline |
Set the year of this date. Values are interpreted as relative to the year 0 AD.
|
inline |
Return a reference to an object that represents the month of this date.
|
inline |
Set the month of this date.
|
inline |
Return a reference to an object that represents the day of this date.
|
inline |
Set the day of this date.
|
inline |
Return a reference to an object that represents the time of day of this date.
|
inline |
Set the time of day of this date.
void om::time::Date::setTime | ( | const Time & | newTime | ) |
Reset the date to the specified Time offset since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
data::String om::time::Date::toString | ( | ) | const |
Convert the Date object to a String representation.
|
inline |
Convert the Date object to a String representation.
|
static |
Get the current time zone that dates are being processed as being in.
The time zone is specified as the signed offset in hours from GMT.
The default initial value for the time zone is the local time zone.
|
static |
Get the local time zone.
The time zone is specified as the signed offset in hours from GMT.
|
inlinestatic |
Set the time zone to use when computing the hour of the day.
The time zone is specified as the signed offset in hours from GMT.
The default initial value for the time zone is the local time zone.