Gregorian date system based on date_time components. More...
Classes | |
struct | bad_day_of_month |
Exception type for gregorian day of month (1..31) More... | |
struct | bad_day_of_year |
Exception type for day of year (1..366) More... | |
struct | bad_month |
Exception thrown if a greg_month is constructed with a value out of range. More... | |
struct | bad_weekday |
Exception that flags that a weekday number is incorrect. More... | |
struct | bad_year |
Exception type for gregorian year. More... | |
class | date |
A date type based on gregorian_calendar. More... | |
class | date_duration |
Durations in days for gregorian system. More... | |
class | greg_day |
Represent a day of the month (range 1 - 31) More... | |
struct | greg_durations_config |
config struct for additional duration types (ie months_duration<> & years_duration<>) More... | |
struct | greg_facet_config |
Configuration of the output facet template. More... | |
class | greg_month |
Wrapper class to represent months in gregorian based calendar. More... | |
class | greg_weekday |
Represent a day within a week (range 0==Sun to 6==Sat) More... | |
class | greg_year |
Represent a day of the month (range 1900 - 10000) More... | |
class | gregorian_calendar |
Gregorian calendar for this implementation, hard work in the base. More... | |
class | weeks_duration |
Functions | |
std::tm | to_tm (const date &d) |
Converts a date to a tm struct. Throws out_of_range exception if date is a special value. More... | |
date | date_from_tm (const std::tm &datetm) |
Converts a tm structure into a date dropping the any time values. More... | |
template<class charT > | |
std::basic_string< charT > | to_simple_string_type (const date &d) |
std::string | to_simple_string (const date &d) |
To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01. More... | |
template<class charT > | |
std::basic_string< charT > | to_simple_string_type (const date_period &d) |
std::string | to_simple_string (const date_period &d) |
Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02]. More... | |
template<class charT > | |
std::basic_string< charT > | to_iso_string_type (const date_period &d) |
std::string | to_iso_string (const date_period &d) |
Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231. More... | |
template<class charT > | |
std::basic_string< charT > | to_iso_extended_string_type (const date &d) |
std::string | to_iso_extended_string (const date &d) |
Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31. More... | |
template<class charT > | |
std::basic_string< charT > | to_iso_string_type (const date &d) |
std::string | to_iso_string (const date &d) |
Convert to iso standard string YYYYMMDD. Example: 20021231. More... | |
template<class charT > | |
std::basic_string< charT > | to_sql_string_type (const date &d) |
std::string | to_sql_string (const date &d) |
std::wstring | to_simple_wstring (const date_period &d) |
Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02]. More... | |
std::wstring | to_simple_wstring (const date &d) |
To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01. More... | |
std::wstring | to_iso_wstring (const date_period &d) |
Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231. More... | |
std::wstring | to_iso_extended_wstring (const date &d) |
Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31. More... | |
std::wstring | to_iso_wstring (const date &d) |
Convert to iso standard string YYYYMMDD. Example: 20021231. More... | |
std::wstring | to_sql_wstring (const date &d) |
template<class charT > | |
std::basic_istream< charT > & | operator>> (std::basic_istream< charT > &is, date &d) |
operator>> for gregorian::date More... | |
template<class charT > | |
std::basic_istream< charT > & | operator>> (std::basic_istream< charT > &is, date_duration &dd) |
operator>> for gregorian::date_duration More... | |
template<class charT > | |
std::basic_istream< charT > & | operator>> (std::basic_istream< charT > &is, date_period &dp) |
operator>> for gregorian::date_period More... | |
BOOST_DATE_TIME_DECL std::locale | generate_locale (std::locale &loc, char type) |
generates a locale with the set of gregorian name-strings of type char* More... | |
BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put < greg_facet_config, char > * | create_facet_def (char type) |
Returns a pointer to a facet with a default set of names (English) More... | |
BOOST_DATE_TIME_DECL std::locale | generate_locale (std::locale &loc, wchar_t type) |
generates a locale with the set of gregorian name-strings of type wchar_t* More... | |
BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put < greg_facet_config, wchar_t > * | create_facet_def (wchar_t type) |
Returns a pointer to a facet with a default set of names (English) More... | |
template<class charT > | |
std::basic_istream< charT > & | operator>> (std::basic_istream< charT > &is, greg_month &m) |
operator>> for gregorian::greg_month - throws exception if invalid month given More... | |
template<class charT > | |
std::basic_istream< charT > & | operator>> (std::basic_istream< charT > &is, greg_weekday &wd) |
operator>> for gregorian::greg_weekday - throws exception if invalid weekday given More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::date &d) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, date &d) |
input operator for date More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::date_duration &dd) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, date_duration &dd) |
input operator for date_duration More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::date_period &dp) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, date_period &dp) |
input operator for date_period More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::greg_month &gm) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, greg_month &m) |
input operator for greg_month More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::greg_weekday &gw) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, greg_weekday &wd) |
input operator for greg_weekday More... | |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, greg_day &gd) |
input operator for greg_day More... | |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, greg_year &gy) |
input operator for greg_year More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::partial_date &pd) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, partial_date &pd) |
input operator for partial_date More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::nth_day_of_the_week_in_month &nkd) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, nth_day_of_the_week_in_month &nday) |
input operator for nth_day_of_the_week_in_month More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::first_day_of_the_week_in_month &fkd) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, first_day_of_the_week_in_month &fkd) |
input operator for first_day_of_the_week_in_month More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::last_day_of_the_week_in_month &lkd) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, last_day_of_the_week_in_month &lkd) |
input operator for last_day_of_the_week_in_month More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::first_day_of_the_week_after &fda) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, first_day_of_the_week_after &fka) |
input operator for first_day_of_the_week_after More... | |
template<class CharT , class TraitsT > | |
std::basic_ostream< CharT, TraitsT > & | operator<< (std::basic_ostream< CharT, TraitsT > &os, const boost::gregorian::first_day_of_the_week_before &fdb) |
template<class CharT , class Traits > | |
std::basic_istream< CharT, Traits > & | operator>> (std::basic_istream< CharT, Traits > &is, first_day_of_the_week_before &fkb) |
input operator for first_day_of_the_week_before More... | |
BOOST_DATE_TIME_DECL special_values | special_value_from_string (const std::string &s) |
Return special_value from string argument. More... | |
date | from_string (std::string s) |
Deprecated: Use from_simple_string. More... | |
date | from_simple_string (std::string s) |
From delimited date string where with order year-month-day eg: 2002-1-25 or 2003-Jan-25 (full month name is also accepted) More... | |
date | from_us_string (std::string s) |
From delimited date string where with order year-month-day eg: 1-25-2003 or Jan-25-2003 (full month name is also accepted) More... | |
date | from_uk_string (std::string s) |
From delimited date string where with order day-month-year eg: 25-1-2002 or 25-Jan-2003 (full month name is also accepted) More... | |
date | from_undelimited_string (std::string s) |
From iso type date string where with order year-month-day eg: 20020125. More... | |
date | date_from_iso_string (const std::string &s) |
From iso type date string where with order year-month-day eg: 20020125. More... | |
template<class iterator_type > | |
date | from_stream (iterator_type beg, iterator_type end) |
Stream should hold a date in the form of: 2002-1-25. Month number, abbrev, or name are accepted. More... | |
date_period | date_period_from_string (const std::string &s) |
Function to parse a date_period from a string (eg: [2003-Oct-31/2003-Dec-25]) More... | |
date_period | date_period_from_wstring (const std::wstring &s) |
Function to parse a date_period from a wstring (eg: [2003-Oct-31/2003-Dec-25]) More... | |
Gregorian date system based on date_time components.
This date system defines a full complement of types including a date, date_duration, date_period, day_clock, and a day_iterator.
An internal date representation that includes infinities, not a date.
typedef boost::date_time::date_facet<date,char> boost::gregorian::date_facet |
Base date_iterator type for gregorian types.
Date periods for the gregorian system.
A clock to get the current day from the local computer.
A day level iterator.
typedef date_duration boost::gregorian::days |
Shorthand for date_duration.
typedef date_time::int_adapter<uint32_t> boost::gregorian::fancy_date_rep |
An internal date representation that includes infinities, not a date.
typedef CV::simple_exception_policy<unsigned short,1,366,bad_day_of_year> boost::gregorian::greg_day_of_year_policies |
A day of the year range (1..366)
Define a range representation type for the day of the year 1..366.
typedef CV::simple_exception_policy<unsigned short, 1, 31, bad_day_of_month> boost::gregorian::greg_day_policies |
Policy class that declares error handling and day of month ranges.
Generated represetation for gregorian day of month.
typedef CV::simple_exception_policy<unsigned short, 1, 12, bad_month> boost::gregorian::greg_month_policies |
Build a policy class for the greg_month_rep.
A constrained range that implements the gregorian_month rules.
typedef CV::simple_exception_policy<unsigned short, 0, 6, bad_weekday> boost::gregorian::greg_weekday_policies |
typedef date_time::year_month_day_base<greg_year, greg_month, greg_day> boost::gregorian::greg_year_month_day |
typedef CV::simple_exception_policy<unsigned short, 1400, 10000, bad_year> boost::gregorian::greg_year_policies |
Policy class that declares error handling gregorian year type.
Generated representation for gregorian year.
A month level iterator.
A date generation object type.
typedef boost::date_time::date_facet<date,wchar_t> boost::gregorian::wdate_facet |
typedef boost::date_time::date_input_facet<date,wchar_t> boost::gregorian::wdate_input_facet |
A week level iterator.
typedef boost::date_time::period_formatter<wchar_t> boost::gregorian::wperiod_formatter |
typedef boost::date_time::period_parser<date,wchar_t> boost::gregorian::wperiod_parser |
typedef boost::date_time::special_values_formatter<wchar_t> boost::gregorian::wspecial_values_formatter |
typedef boost::date_time::special_values_parser<date,wchar_t> boost::gregorian::wspecial_values_parser |
A unifying date_generator base type.
A unifying date_generator base type for: partial_date, nth_day_of_the_week_in_month, first_day_of_the_week_in_month, and last_day_of_the_week_in_month
A year level iterator.
BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put<greg_facet_config, char>* boost::gregorian::create_facet_def | ( | char | type | ) |
Returns a pointer to a facet with a default set of names (English)
Referenced by operator>>().
BOOST_DATE_TIME_DECL boost::date_time::all_date_names_put<greg_facet_config, wchar_t>* boost::gregorian::create_facet_def | ( | wchar_t | type | ) |
Returns a pointer to a facet with a default set of names (English)
|
inline |
From iso type date string where with order year-month-day eg: 20020125.
References boost::asio::s.
|
inline |
Converts a tm structure into a date dropping the any time values.
References boost::locale::flags::date.
Referenced by boost::posix_time::ptime_from_tm().
|
inline |
Function to parse a date_period from a string (eg: [2003-Oct-31/2003-Dec-25])
|
inline |
Function to parse a date_period from a wstring (eg: [2003-Oct-31/2003-Dec-25])
|
inline |
From delimited date string where with order year-month-day eg: 2002-1-25 or 2003-Jan-25 (full month name is also accepted)
References boost::asio::s, and boost::date_time::ymd_order_iso.
|
inline |
Stream should hold a date in the form of: 2002-1-25. Month number, abbrev, or name are accepted.
References boost::locale::flags::date, boost::end, and boost::date_time::not_a_date_time.
Referenced by operator>>().
|
inline |
Deprecated: Use from_simple_string.
References boost::asio::s.
|
inline |
From delimited date string where with order day-month-year eg: 25-1-2002 or 25-Jan-2003 (full month name is also accepted)
References boost::asio::s, and boost::date_time::ymd_order_dmy.
|
inline |
From iso type date string where with order year-month-day eg: 20020125.
References boost::asio::s.
Referenced by boost::serialization::load().
|
inline |
From delimited date string where with order year-month-day eg: 1-25-2003 or Jan-25-2003 (full month name is also accepted)
References boost::asio::s, and boost::date_time::ymd_order_us.
BOOST_DATE_TIME_DECL std::locale boost::gregorian::generate_locale | ( | std::locale & | loc, |
char | type | ||
) |
generates a locale with the set of gregorian name-strings of type char*
Referenced by operator>>().
BOOST_DATE_TIME_DECL std::locale boost::gregorian::generate_locale | ( | std::locale & | loc, |
wchar_t | type | ||
) |
generates a locale with the set of gregorian name-strings of type wchar_t*
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
References boost::put().
|
inline |
input operator for date
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for date_duration
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for date_period
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
operator>> for gregorian::date
References boost::xpressive::eos, and from_stream().
|
inline |
operator>> for gregorian::date_duration
|
inline |
operator>> for gregorian::date_period
References boost::asio::s.
|
inline |
input operator for greg_month
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
operator>> for gregorian::greg_month - throws exception if invalid month given
References boost::a, create_facet_def(), boost::date_time::find_match(), generate_locale(), boost::accumulators::extract::max, and boost::asio::s.
|
inline |
operator>> for gregorian::greg_weekday - throws exception if invalid weekday given
References boost::a, create_facet_def(), boost::date_time::find_match(), generate_locale(), boost::accumulators::extract::max, and boost::asio::s.
|
inline |
input operator for greg_weekday
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for greg_day
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for greg_year
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for partial_date
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for nth_day_of_the_week_in_month
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for first_day_of_the_week_in_month
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for last_day_of_the_week_in_month
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for first_day_of_the_week_after
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
|
inline |
input operator for first_day_of_the_week_before
References boost::regex_constants::failbit, and boost::date_time::date_input_facet< date_type, CharT, InItrT >::get().
BOOST_DATE_TIME_DECL special_values boost::gregorian::special_value_from_string | ( | const std::string & | s | ) |
Return special_value from string argument.
Return special_value from string argument. If argument is not one of the special value names (defined in src/gregorian/names.hpp), return 'not_special'
Referenced by boost::serialization::load().
|
inline |
Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31.
|
inline |
|
inline |
Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31.
|
inline |
Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231.
Referenced by boost::serialization::save().
|
inline |
Convert to iso standard string YYYYMMDD. Example: 20021231.
|
inline |
|
inline |
|
inline |
Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231.
|
inline |
Convert to iso standard string YYYYMMDD. Example: 20021231.
|
inline |
To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01.
Referenced by boost::serialization::save().
|
inline |
Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02].
|
inline |
|
inline |
|
inline |
Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02].
|
inline |
To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01.
|
inline |
|
inline |
|
inline |
|
inline |
Converts a date to a tm struct. Throws out_of_range exception if date is a special value.
References boost::date_time::date< T, calendar, duration_type_ >::as_special(), boost::date_time::date< T, calendar, duration_type_ >::day_of_week(), boost::gregorian::date::day_of_year(), boost::date_time::date< T, calendar, duration_type_ >::is_special(), boost::date_time::neg_infin, boost::date_time::not_a_date_time, boost::date_time::pos_infin, boost::asio::s, boost::throw_exception(), and boost::date_time::date< T, calendar, duration_type_ >::year_month_day().
Referenced by boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::put(), boost::date_time::time_facet< time_type, CharT, OutItrT >::put(), and boost::posix_time::to_tm().