A date type based on gregorian_calendar. More...
#include <greg_date.hpp>
Public Types | |
typedef gregorian_calendar::year_type | year_type |
typedef gregorian_calendar::month_type | month_type |
typedef gregorian_calendar::day_type | day_type |
typedef gregorian_calendar::day_of_year_type | day_of_year_type |
typedef gregorian_calendar::ymd_type | ymd_type |
typedef gregorian_calendar::date_rep_type | date_rep_type |
typedef gregorian_calendar::date_int_type | date_int_type |
typedef date_duration | duration_type |
typedef date | date_type |
typedef gregorian_calendar | calendar_type |
typedef gregorian_calendar::date_traits_type | traits_type |
typedef gregorian_calendar::day_of_week_type | day_of_week_type |
Public Member Functions | |
date () | |
Default constructor constructs with not_a_date_time. More... | |
date (year_type y, month_type m, day_type d) | |
Main constructor with year, month, day. More... | |
date (const ymd_type &ymd) | |
Constructor from a ymd_type structure. More... | |
date (const date_int_type &rhs) | |
Needed copy constructor. More... | |
date (date_rep_type rhs) | |
Needed copy constructor. More... | |
date (special_values sv) | |
Constructor for infinities, not a date, max and min date. More... | |
date_int_type | julian_day () const |
Return the Julian Day number for the date. More... | |
day_of_year_type | day_of_year () const |
Return the day of year 1..365 or 1..366 (for leap year) More... | |
date_int_type | modjulian_day () const |
Return the Modified Julian Day number for the date. More... | |
int | week_number () const |
Return the iso 8601 week number 1..53. More... | |
date_int_type | day_number () const |
Return the day number from the calendar. More... | |
date | end_of_month () const |
Return the last day of the current month. More... | |
year_type | year () const |
month_type | month () const |
day_type | day () const |
day_of_week_type | day_of_week () const |
ymd_type | year_month_day () const |
bool | operator< (const date_type &rhs) const |
bool | operator== (const date_type &rhs) const |
bool | is_special () const |
check to see if date is a special value More... | |
bool | is_not_a_date () const |
check to see if date is not a value More... | |
bool | is_infinity () const |
check to see if date is one of the infinity values More... | |
bool | is_pos_infinity () const |
check to see if date is greater than all possible dates More... | |
bool | is_neg_infinity () const |
check to see if date is greater than all possible dates More... | |
special_values | as_special () const |
return as a special value or a not_special if a normal date More... | |
duration_type | operator- (const date_type &d) const |
date_type | operator- (const duration_type &dd) const |
date_type | operator-= (const duration_type &dd) |
date_rep_type | day_count () const |
date_type | operator+ (const duration_type &dd) const |
date_type | operator+= (const duration_type &dd) |
Protected Attributes | |
date_int_type | days_ |
A date type based on gregorian_calendar.
This class is the primary interface for programming with greogorian dates. The is a lightweight type that can be freely passed by value. All comparison operators are supported.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inline |
Default constructor constructs with not_a_date_time.
Referenced by date(), and end_of_month().
|
inline |
Main constructor with year, month, day.
|
inlineexplicit |
Constructor from a ymd_type structure.
|
inlineexplicit |
Needed copy constructor.
|
inlineexplicit |
Needed copy constructor.
|
inlineexplicit |
Constructor for infinities, not a date, max and min date.
References date(), boost::date_time::max_date_time, and boost::date_time::min_date_time.
|
inlineinherited |
return as a special value or a not_special if a normal date
References boost::date_time::date< T, calendar, duration_type_ >::days_.
|
inlineinherited |
|
inlineinherited |
|
inline |
Return the day number from the calendar.
References boost::date_time::date< date, gregorian_calendar, date_duration >::days_.
|
inlineinherited |
|
inline |
Return the day of year 1..365 or 1..366 (for leap year)
References boost::date_time::date< date, gregorian_calendar, date_duration >::year().
Referenced by boost::gregorian::to_tm().
|
inline |
Return the last day of the current month.
References date(), boost::date_time::gregorian_calendar_base< greg_year_month_day, fancy_date_rep::int_type >::end_of_month_day(), and boost::date_time::date< date, gregorian_calendar, date_duration >::year_month_day().
|
inlineinherited |
check to see if date is one of the infinity values
References boost::date_time::date< T, calendar, duration_type_ >::days_.
|
inlineinherited |
check to see if date is greater than all possible dates
References boost::date_time::date< T, calendar, duration_type_ >::days_.
|
inlineinherited |
check to see if date is not a value
References boost::date_time::date< T, calendar, duration_type_ >::days_.
|
inlineinherited |
check to see if date is greater than all possible dates
References boost::date_time::date< T, calendar, duration_type_ >::days_.
|
inlineinherited |
check to see if date is a special value
References boost::date_time::date< T, calendar, duration_type_ >::is_infinity(), and boost::date_time::date< T, calendar, duration_type_ >::is_not_a_date().
|
inline |
Return the Julian Day number for the date.
References boost::date_time::gregorian_calendar_base< greg_year_month_day, fancy_date_rep::int_type >::julian_day_number(), and boost::date_time::date< date, gregorian_calendar, date_duration >::year_month_day().
|
inline |
Return the Modified Julian Day number for the date.
References boost::date_time::gregorian_calendar_base< greg_year_month_day, fancy_date_rep::int_type >::modjulian_day_number(), and boost::date_time::date< date, gregorian_calendar, date_duration >::year_month_day().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Return the iso 8601 week number 1..53.
References boost::date_time::gregorian_calendar_base< greg_year_month_day, fancy_date_rep::int_type >::week_number(), and boost::date_time::date< date, gregorian_calendar, date_duration >::year_month_day().
|
inlineinherited |
References boost::date_time::date< T, calendar, duration_type_ >::days_.
Referenced by day_of_year().
|
inlineinherited |
References boost::date_time::date< T, calendar, duration_type_ >::days_.
Referenced by end_of_month(), julian_day(), modjulian_day(), and week_number().
|
protectedinherited |
Referenced by day_number().