54 unsigned int get_month(
const bool leap_year =
false)
const;
Helper class to hold an absolute simulation day.
Definition: date.h:19
bool operator>(const Date &rhs) const
Whether another date is before this date.
Definition: date.cpp:155
static const std::array< int, 12 > FIRST_OF_MONTH_LEAP
The Julian day of the first of each month in a 366-days (leap) year.
Definition: date.h:87
bool operator<(const Date &rhs) const
Whether another date is after this date.
Definition: date.cpp:151
static const std::array< int, 12 > MONTH_LENGTH
The number of days in each month in a 365-days (non-leap) year.
Definition: date.h:81
int get_year() const
The year specified in the constructor.
Definition: date.h:57
bool is_successive(const Date &other_date) const
Whether another Date object represents the following day.
Definition: date.cpp:128
int year
Definition: date.h:90
bool operator!=(const Date &rhs) const
Whether another Date object specifies a different day.
Definition: date.cpp:146
unsigned int get_month(const bool leap_year=false) const
The month (counting from 0 == January).
Definition: date.cpp:98
static const std::array< int, 12 > FIRST_OF_MONTH
The Julian day of the first of each month in a 365-days (non-leap) year.
Definition: date.h:84
bool operator==(const Date &rhs) const
Whether another Date object specifies the same day.
Definition: date.cpp:141
unsigned int get_julian_day() const
Day of the year (counting from 0 == Jan 1st).
Definition: date.h:42
unsigned int julian_day
Definition: date.h:89
unsigned int get_day_of_month(bool leap_year=false) const
Get the day of the month (0 = 1st).
Definition: date.cpp:90