Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Static Public Member Functions | List of all members
om::time::Date Class Reference

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 MonthgetMonth () 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 DaygetDay () 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 TimeOfDaygetTimeOfDay () 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...
 

Detailed Description

A class that represents an instant in time within the modern calendar.

Constructor & Destructor Documentation

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).

om::time::Date::Date ( Int64  newYear,
const Month newMonth,
const Day newDay 
)
inline

Create a date corresponding to the specified year, month, and day, at the first instant of the day.

om::time::Date::Date ( Int64  newYear,
const Month newMonth,
const Day newDay,
const TimeOfDay newTimeOfDay 
)
inline

Create a date corresponding to the specified year, month, day, and time of day.

Member Function Documentation

Int64 om::time::Date::getYear ( ) const
inline

Return the year of this date. Values are interpreted as relative to the year 0 AD.

void om::time::Date::setYear ( Int64  newYear)
inline

Set the year of this date. Values are interpreted as relative to the year 0 AD.

const Month& om::time::Date::getMonth ( ) const
inline

Return a reference to an object that represents the month of this date.

void om::time::Date::setMonth ( const Month newMonth)
inline

Set the month of this date.

const Day& om::time::Date::getDay ( ) const
inline

Return a reference to an object that represents the day of this date.

void om::time::Date::setDay ( const Day newDay)
inline

Set the day of this date.

const TimeOfDay& om::time::Date::getTimeOfDay ( ) const
inline

Return a reference to an object that represents the time of day of this date.

void om::time::Date::setTimeOfDay ( const TimeOfDay newTimeOfDay)
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.

om::time::Date::operator data::String ( ) const
inline

Convert the Date object to a String representation.

static Int om::time::Date::getTimeZone ( )
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 Int om::time::Date::getLocalTimeZone ( )
static

Get the local time zone.

The time zone is specified as the signed offset in hours from GMT.

static void om::time::Date::setTimeZone ( Int  newTimeZone)
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.


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