#include <Date.hpp>
Public Types | |
typedef boost::gregorian::date | ImplType |
impl type is boost::gregorian::date More... | |
Public Member Functions | |
int | assumedBaseYear () const |
assumed base year More... | |
boost::optional< int > | baseYear () const |
user provided base year More... | |
void | baseYear (int baseYear) |
set base year More... | |
Date () | |
default constructor More... | |
Date (const ImplType &impl) | |
from impl More... | |
Date (MonthOfYear monthOfYear, unsigned dayOfMonth) | |
Date from month, day of month. More... | |
Date (MonthOfYear monthOfYear, unsigned dayOfMonth, int year) | |
Date from month, day of month, year. More... | |
Date (MonthOfYear monthOfYear, unsigned dayOfMonth, const YearDescription &yearDescription) | |
Date from YearDescription, month, and day of month. More... | |
Date (const std::string &string) | |
constructor from string More... | |
Date (tm t_tm) | |
Date from a system tm structure. More... | |
Date (const Date &other) | |
copy constructor More... | |
unsigned | dayOfMonth () const |
day of month More... | |
DayOfWeek | dayOfWeek () const |
day of the week More... | |
unsigned | dayOfYear () const |
day of year More... | |
bool | isLeapYear () const |
is assumed year a leap year More... | |
MonthOfYear | monthOfYear () const |
month of year More... | |
bool | operator!= (const Date &other) const |
non-equality operator More... | |
Date | operator+ (const Time &time) const |
addition operator More... | |
Date & | operator+= (const Time &time) |
assignment by addition operator More... | |
Date | operator- (const Time &time) const |
difference operator More... | |
Time | operator- (const Date &date) const |
time duration More... | |
Date & | operator-= (const Time &time) |
assignment by difference operator More... | |
bool | operator< (const Date &rhs) const |
less than operator More... | |
bool | operator<= (const Date &rhs) const |
less than equals operator More... | |
Date & | operator= (const Date &other) |
assignment operator More... | |
bool | operator== (const Date &other) const |
equality operator More... | |
bool | operator> (const Date &rhs) const |
greater than operator More... | |
bool | operator>= (const Date &rhs) const |
greater than equals operator More... | |
int | year () const |
year More... | |
~Date () | |
destructor More... | |
Static Public Member Functions | |
static Date | currentDate () |
get current Date More... | |
static Date | fromDayOfYear (unsigned dayOfYear) |
Day of year generators. More... | |
static Date | fromDayOfYear (unsigned dayOfYear, int year) |
static Date | fromDayOfYear (unsigned dayOfYear, const YearDescription &yearDescription) |
static Date | fromNthDayOfMonth (NthDayOfWeekInMonth n, DayOfWeek dayOfWeek, MonthOfYear monthOfYear) |
nth weekday of month generators More... | |
static Date | fromNthDayOfMonth (NthDayOfWeekInMonth n, DayOfWeek dayOfWeek, MonthOfYear monthOfYear, int year) |
static bool | isLeapYear (int year) |
is year a leap year More... | |
static openstudio::LogChannel | logChannel () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Date &date) |
std::ostream & | operator<< (std::ostream &os, const DateTime &dateTime) |
Date is an absolute unit of time, resolution to the day Date is simple wrapper around boost::gregorian::date.
typedef boost::gregorian::date openstudio::Date::ImplType |
impl type is boost::gregorian::date
openstudio::Date::Date | ( | ) |
default constructor
|
inline |
destructor
openstudio::Date::Date | ( | const ImplType & | impl | ) |
from impl
openstudio::Date::Date | ( | MonthOfYear | monthOfYear, |
unsigned | dayOfMonth | ||
) |
Date from month, day of month.
openstudio::Date::Date | ( | MonthOfYear | monthOfYear, |
unsigned | dayOfMonth, | ||
int | year | ||
) |
Date from month, day of month, year.
openstudio::Date::Date | ( | MonthOfYear | monthOfYear, |
unsigned | dayOfMonth, | ||
const YearDescription & | yearDescription | ||
) |
Date from YearDescription, month, and day of month.
openstudio::Date::Date | ( | const std::string & | string | ) |
constructor from string
openstudio::Date::Date | ( | tm | t_tm | ) |
Date from a system tm structure.
openstudio::Date::Date | ( | const Date & | other | ) |
copy constructor
int openstudio::Date::assumedBaseYear | ( | ) | const |
assumed base year
boost::optional<int> openstudio::Date::baseYear | ( | ) | const |
user provided base year
void openstudio::Date::baseYear | ( | int | baseYear | ) |
set base year
unsigned openstudio::Date::dayOfMonth | ( | ) | const |
day of month
DayOfWeek openstudio::Date::dayOfWeek | ( | ) | const |
day of the week
unsigned openstudio::Date::dayOfYear | ( | ) | const |
day of year
|
static |
Day of year generators.
|
static |
|
static |
nth weekday of month generators
|
static |
|
static |
is year a leap year
bool openstudio::Date::isLeapYear | ( | ) | const |
is assumed year a leap year
|
inlinestatic |
MonthOfYear openstudio::Date::monthOfYear | ( | ) | const |
month of year
bool openstudio::Date::operator!= | ( | const Date & | other | ) | const |
non-equality operator
bool openstudio::Date::operator< | ( | const Date & | rhs | ) | const |
less than operator
bool openstudio::Date::operator<= | ( | const Date & | rhs | ) | const |
less than equals operator
bool openstudio::Date::operator== | ( | const Date & | other | ) | const |
equality operator
bool openstudio::Date::operator> | ( | const Date & | rhs | ) | const |
greater than operator
bool openstudio::Date::operator>= | ( | const Date & | rhs | ) | const |
greater than equals operator
int openstudio::Date::year | ( | ) | const |
year
|
friend |
|
friend |