fix doc example typo
[boost.git] / boost / date_time / local_time / dst_transition_day_rules.hpp
blobf372e44a45a5bcc93471608e52911716971aeb02
1 #ifndef LOCAL_TIME_DST_TRANSITION_DAY_RULES_HPP__
2 #define LOCAL_TIME_DST_TRANSITION_DAY_RULES_HPP__
4 /* Copyright (c) 2003-2004 CrystalClear Software, Inc.
5 * Subject to the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7 * Author: Jeff Garland, Bart Garst
8 * $Date$
9 */
12 #include "boost/date_time/gregorian/gregorian_types.hpp"
13 #include "boost/date_time/dst_transition_generators.hpp"
15 namespace boost {
16 namespace local_time {
18 //! Provides rule of the form starting Apr 30 ending Oct 21
19 typedef date_time::dst_day_calc_rule<gregorian::date> dst_calc_rule;
21 struct partial_date_rule_spec
23 typedef gregorian::date date_type;
24 typedef gregorian::partial_date start_rule;
25 typedef gregorian::partial_date end_rule;
28 //! Provides rule of the form first Sunday in April, last Saturday in Oct
29 typedef date_time::day_calc_dst_rule<partial_date_rule_spec> partial_date_dst_rule;
31 struct first_last_rule_spec
33 typedef gregorian::date date_type;
34 typedef gregorian::first_kday_of_month start_rule;
35 typedef gregorian::last_kday_of_month end_rule;
38 //! Provides rule of the form first Sunday in April, last Saturday in Oct
39 typedef date_time::day_calc_dst_rule<first_last_rule_spec> first_last_dst_rule;
41 struct last_last_rule_spec
43 typedef gregorian::date date_type;
44 typedef gregorian::last_kday_of_month start_rule;
45 typedef gregorian::last_kday_of_month end_rule;
48 //! Provides rule of the form last Sunday in April, last Saturday in Oct
49 typedef date_time::day_calc_dst_rule<last_last_rule_spec> last_last_dst_rule;
51 struct nth_last_rule_spec
53 typedef gregorian::date date_type;
54 typedef gregorian::nth_kday_of_month start_rule;
55 typedef gregorian::last_kday_of_month end_rule;
58 //! Provides rule in form of [1st|2nd|3rd|4th] Sunday in April, last Sunday in Oct
59 typedef date_time::day_calc_dst_rule<nth_last_rule_spec> nth_last_dst_rule;
61 struct nth_kday_rule_spec
63 typedef gregorian::date date_type;
64 typedef gregorian::nth_kday_of_month start_rule;
65 typedef gregorian::nth_kday_of_month end_rule;
68 //! Provides rule in form of [1st|2nd|3rd|4th] Sunday in April/October
69 typedef date_time::day_calc_dst_rule<nth_kday_rule_spec> nth_kday_dst_rule;
70 //! Provides rule in form of [1st|2nd|3rd|4th] Sunday in April/October
71 typedef date_time::day_calc_dst_rule<nth_kday_rule_spec> nth_day_of_the_week_in_month_dst_rule;
74 } }//namespace
77 #endif