Gregorian calendar for this implementation, hard work in the base. More...
#include <greg_calendar.hpp>
Public Types | |
typedef greg_weekday | day_of_week_type |
Type to hold a weekday (eg: Sunday, Monday,...) More... | |
typedef greg_day_of_year_rep | day_of_year_type |
Counter type from 1 to 366 for gregorian dates. More... | |
typedef fancy_date_rep | date_rep_type |
Internal date representation that handles infinity, not a date. More... | |
typedef fancy_date_rep | date_traits_type |
Date rep implements the traits stuff as well. More... | |
typedef greg_year_month_day | ymd_type |
define a type a date split into components More... | |
typedef ymd_type::month_type | month_type |
define a type for representing months More... | |
typedef ymd_type::day_type | day_type |
define a type for representing days More... | |
typedef ymd_type::year_type | year_type |
Type to hold a stand alone year value (eg: 2002) More... | |
typedef fancy_date_rep::int_type | date_int_type |
Define the integer type to use for internal calculations. More... | |
Static Public Member Functions | |
static unsigned short | day_of_week (const ymd_type &ymd) |
Return the day of the week (0==Sunday, 1==Monday, etc) More... | |
static int | week_number (const ymd_type &ymd) |
Return the iso week number for the date. More... | |
static date_int_type | day_number (const ymd_type &ymd) |
Convert a ymd_type into a day number. More... | |
static date_int_type | julian_day_number (const ymd_type &ymd) |
Convert a year-month-day into the julian day number. More... | |
static date_int_type | modjulian_day_number (const ymd_type &ymd) |
Convert year-month-day into a modified julian day number. More... | |
static ymd_type | from_day_number (date_int_type) |
Change a day number into a year-month-day. More... | |
static ymd_type | from_julian_day_number (date_int_type) |
Change a day number into a year-month-day. More... | |
static ymd_type | from_modjulian_day_number (date_int_type) |
Change a modified julian day number into a year-month-day. More... | |
static bool | is_leap_year (year_type) |
Determine if the provided year is a leap year. More... | |
static unsigned short | end_of_month_day (year_type y, month_type m) |
Calculate the last day of the month. More... | |
static ymd_type | epoch () |
Provide the ymd_type specification for the calandar start. More... | |
static unsigned short | days_in_week () |
Defines length of a week for week calculations. More... | |
Gregorian calendar for this implementation, hard work in the base.
|
inherited |
Define the integer type to use for internal calculations.
Internal date representation that handles infinity, not a date.
Date rep implements the traits stuff as well.
Type to hold a weekday (eg: Sunday, Monday,...)
Counter type from 1 to 366 for gregorian dates.
|
inherited |
define a type for representing days
|
inherited |
define a type for representing months
|
inherited |
Type to hold a stand alone year value (eg: 2002)
|
inherited |
define a type a date split into components
|
staticinherited |
Convert a ymd_type into a day number.
The day number is an absolute number of days since the start of count
|
staticinherited |
Return the day of the week (0==Sunday, 1==Monday, etc)
Converts a year-month-day into a day of the week number
|
staticinherited |
Defines length of a week for week calculations.
|
staticinherited |
Calculate the last day of the month.
Find the day which is the end of the month given year and month No error checking is performed.
Referenced by boost::gregorian::date::end_of_month().
|
staticinherited |
Provide the ymd_type specification for the calandar start.
|
staticinherited |
Change a day number into a year-month-day.
|
staticinherited |
Change a day number into a year-month-day.
|
staticinherited |
Change a modified julian day number into a year-month-day.
|
staticinherited |
Determine if the provided year is a leap year.
|
staticinherited |
Convert a year-month-day into the julian day number.
Since this implementation uses julian day internally, this is the same as the day_number.
Referenced by boost::gregorian::date::julian_day().
|
staticinherited |
Convert year-month-day into a modified julian day number.
The day number is an absolute number of days. MJD 0 thus started on 17 Nov 1858(Gregorian) at 00:00:00 UTC
Referenced by boost::gregorian::date::modjulian_day().
|
staticinherited |
Return the iso week number for the date.
Implements the rules associated with the iso 8601 week number. Basically the rule is that Week 1 of the year is the week that contains January 4th or the week that contains the first Thursday in January. Reference for this algorithm is the Calendar FAQ by Claus Tondering, April 2000.
Referenced by boost::gregorian::date::week_number().