Generates a date by applying the year to the given month and day. More...
#include <date_generators.hpp>
Public Types | |
typedef date_type::calendar_type | calendar_type |
typedef calendar_type::day_type | day_type |
typedef calendar_type::month_type | month_type |
typedef calendar_type::year_type | year_type |
typedef date_type::duration_type | duration_type |
typedef duration_type::duration_rep | duration_rep |
Public Member Functions | |
partial_date (day_type d, month_type m) | |
partial_date (duration_rep days) | |
Partial date created from number of days into year. Range 1-366. More... | |
date_type | get_date (year_type y) const |
Return a concrete date when provided with a year specific year. More... | |
date_type | operator() (year_type y) const |
bool | operator== (const partial_date &rhs) const |
bool | operator< (const partial_date &rhs) const |
month_type | month () const |
day_type | day () const |
virtual std::string | to_string () const |
Returns string suitable for use in POSIX time zone string. More... | |
Generates a date by applying the year to the given month and day.
Example usage:
typedef date_type::calendar_type boost::date_time::partial_date< date_type >::calendar_type |
typedef calendar_type::day_type boost::date_time::partial_date< date_type >::day_type |
typedef duration_type::duration_rep boost::date_time::partial_date< date_type >::duration_rep |
typedef date_type::duration_type boost::date_time::partial_date< date_type >::duration_type |
typedef calendar_type::month_type boost::date_time::partial_date< date_type >::month_type |
typedef calendar_type::year_type boost::date_time::partial_date< date_type >::year_type |
|
inline |
|
inline |
Partial date created from number of days into year. Range 1-366.
Allowable values range from 1 to 366. 1=Jan1, 366=Dec31. If argument exceeds range, partial_date will be created with closest in-range value. 60 will always be Feb29, if get_date() is called with a non-leap year an exception will be thrown
|
inline |
|
inlinevirtual |
Return a concrete date when provided with a year specific year.
Will throw an 'invalid_argument' exception if a partial_date object, instantiated with Feb-29, has get_date called with a non-leap year. Example:
Implements boost::date_time::year_based_generator< date_type >.
References boost::asio::error::invalid_argument, and boost::throw_exception().
Referenced by boost::date_time::partial_date< date_type >::operator()().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Returns string suitable for use in POSIX time zone string.
Returns string formatted with up to 3 digits: Jan-01 == "0" Feb-29 == "58" Dec-31 == "365"
Implements boost::date_time::year_based_generator< date_type >.
References boost::multiprecision::backends::c.