File indexing completed on 2025-01-18 09:30:38
0001 #ifndef DATE_TIME_GREGORIAN_CALENDAR_HPP__
0002 #define DATE_TIME_GREGORIAN_CALENDAR_HPP__
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <boost/date_time/compiler_config.hpp>
0013
0014 namespace boost {
0015 namespace date_time {
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 template<typename ymd_type_, typename date_int_type_>
0029 class BOOST_SYMBOL_VISIBLE gregorian_calendar_base {
0030 public:
0031
0032 typedef ymd_type_ ymd_type;
0033
0034 typedef typename ymd_type::month_type month_type;
0035
0036 typedef typename ymd_type::day_type day_type;
0037
0038 typedef typename ymd_type::year_type year_type;
0039
0040 typedef date_int_type_ date_int_type;
0041
0042
0043 static BOOST_CXX14_CONSTEXPR unsigned short day_of_week(const ymd_type& ymd);
0044 static BOOST_CXX14_CONSTEXPR int week_number(const ymd_type&ymd);
0045 static BOOST_CXX14_CONSTEXPR date_int_type day_number(const ymd_type& ymd);
0046 static BOOST_CXX14_CONSTEXPR date_int_type julian_day_number(const ymd_type& ymd);
0047 static BOOST_CXX14_CONSTEXPR date_int_type modjulian_day_number(const ymd_type& ymd);
0048 static BOOST_CXX14_CONSTEXPR ymd_type from_day_number(date_int_type);
0049 static BOOST_CXX14_CONSTEXPR ymd_type from_julian_day_number(date_int_type);
0050 static BOOST_CXX14_CONSTEXPR ymd_type from_modjulian_day_number(date_int_type);
0051 static BOOST_CXX14_CONSTEXPR bool is_leap_year(year_type);
0052 static BOOST_CXX14_CONSTEXPR unsigned short end_of_month_day(year_type y, month_type m);
0053 static BOOST_CXX14_CONSTEXPR ymd_type epoch();
0054 static BOOST_CXX14_CONSTEXPR unsigned short days_in_week();
0055
0056 };
0057
0058
0059
0060 } }
0061
0062 #include "boost/date_time/gregorian_calendar.ipp"
0063
0064
0065
0066
0067 #endif
0068
0069