1 #ifndef _GREGORIAN_TYPES_HPP__
2 #define _GREGORIAN_TYPES_HPP__
4 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
5 * Use, modification and distribution is subject to the
6 * Boost Software License, Version 1.0. (See accompanying
7 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 * Author: Jeff Garland, Bart Garst
12 /*! @file gregorian_types.hpp
13 Single file header that defines most of the types for the gregorian
17 #include "boost/date_time/date.hpp"
18 #include "boost/date_time/period.hpp"
19 #include "boost/date_time/gregorian/greg_calendar.hpp"
20 #include "boost/date_time/gregorian/greg_duration.hpp"
21 #if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES)
22 #include "boost/date_time/gregorian/greg_duration_types.hpp"
24 #include "boost/date_time/gregorian/greg_date.hpp"
25 #include "boost/date_time/date_generators.hpp"
26 #include "boost/date_time/date_clock_device.hpp"
27 #include "boost/date_time/date_iterator.hpp"
28 #include "boost/date_time/adjust_functors.hpp"
32 //! Gregorian date system based on date_time components
33 /*! This date system defines a full complement of types including
34 * a date, date_duration, date_period, day_clock, and a
38 //! Date periods for the gregorian system
39 /*!\ingroup date_basics
41 typedef date_time::period<date, date_duration> date_period;
43 //! A unifying date_generator base type
44 /*! A unifying date_generator base type for:
45 * partial_date, nth_day_of_the_week_in_month,
46 * first_day_of_the_week_in_month, and last_day_of_the_week_in_month
48 typedef date_time::year_based_generator<date> year_based_generator;
50 //! A date generation object type
51 typedef date_time::partial_date<date> partial_date;
53 typedef date_time::nth_kday_of_month<date> nth_kday_of_month;
54 typedef nth_kday_of_month nth_day_of_the_week_in_month;
56 typedef date_time::first_kday_of_month<date> first_kday_of_month;
57 typedef first_kday_of_month first_day_of_the_week_in_month;
59 typedef date_time::last_kday_of_month<date> last_kday_of_month;
60 typedef last_kday_of_month last_day_of_the_week_in_month;
62 typedef date_time::first_kday_after<date> first_kday_after;
63 typedef first_kday_after first_day_of_the_week_after;
65 typedef date_time::first_kday_before<date> first_kday_before;
66 typedef first_kday_before first_day_of_the_week_before;
68 //! A clock to get the current day from the local computer
69 /*!\ingroup date_basics
71 typedef date_time::day_clock<date> day_clock;
73 //! Base date_iterator type for gregorian types.
74 /*!\ingroup date_basics
76 typedef date_time::date_itr_base<date> date_iterator;
78 //! A day level iterator
79 /*!\ingroup date_basics
81 typedef date_time::date_itr<date_time::day_functor<date>,
83 //! A week level iterator
84 /*!\ingroup date_basics
86 typedef date_time::date_itr<date_time::week_functor<date>,
88 //! A month level iterator
89 /*!\ingroup date_basics
91 typedef date_time::date_itr<date_time::month_functor<date>,
93 //! A year level iterator
94 /*!\ingroup date_basics
96 typedef date_time::date_itr<date_time::year_functor<date>,
99 // bring in these date_generator functions from date_time namespace
100 using date_time::days_until_weekday;
101 using date_time::days_before_weekday;
102 using date_time::next_weekday;
103 using date_time::previous_weekday;
105 } } //namespace gregorian