Home | Libraries | People | FAQ | More |
boost::date_time::gregorian_calendar_base — An implementation of the Gregorian calendar.
template<typename ymd_type_, typename date_int_type_> class gregorian_calendar_base { public: // types typedef ymd_type_ ymd_type; // define a type a date split into components typedef ymd_type::month_type month_type; // define a type for representing months typedef ymd_type::day_type day_type; // define a type for representing days typedef ymd_type::year_type year_type; // Type to hold a stand alone year value (eg: 2002). typedef date_int_type_ date_int_type; // Define the integer type to use for internal calculations. // public static functions unsigned short day_of_week(const ymd_type &) ; int week_number(const ymd_type &) ; date_int_type day_number(const ymd_type &) ; date_int_type julian_day_number(const ymd_type &) ; long modjulian_day_number(const ymd_type &) ; ymd_type from_day_number(date_int_type) ; ymd_type from_julian_day_number(date_int_type) ; ymd_type from_modjulian_day_number(long) ; bool is_leap_year(year_type) ; unsigned short end_of_month_day(year_type, month_type) ; ymd_type epoch() ; unsigned short days_in_week() ; };
This is a parameterized implementation of a proleptic Gregorian Calendar that can be used in the creation of date systems or just to perform calculations. All the methods of this class are static functions, so the intent is to never create instances of this class.
gregorian_calendar_base
public static functionsunsigned short day_of_week(const ymd_type & ymd) ;
int week_number(const ymd_type & ymd) ;
date_int_type day_number(const ymd_type & ymd) ;
date_int_type julian_day_number(const ymd_type & ymd) ;
long modjulian_day_number(const ymd_type & ymd) ;
ymd_type from_day_number(date_int_type ) ;
ymd_type from_julian_day_number(date_int_type ) ;
ymd_type from_modjulian_day_number(long ) ;
bool is_leap_year(year_type ) ;
unsigned short end_of_month_day(year_type y, month_type m) ;
ymd_type epoch() ;
unsigned short days_in_week() ;
Copyright © 2001-2005 CrystalClear Software, Inc |