![]() |
Home | Libraries | People | FAQ | More |
boost::date_time::partial_date — Generates a date by applying the year to the given month and day.
// In header: <boost/date_time/date_generators.hpp> template<typename date_type> class partial_date : public { public: // types typedef ; typedef ; typedef ; typedef ; typedef ; typedef ; // construct/copy/destruct (, ); (); // public member functions () ; () ; bool (const partial_date &) ; bool (const partial_date &) ; () ; () ; () ; };
Example usage:
partial_date
public
construct/copy/destruct( d, m);
( days);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
partial_date
public member functions( y) ;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:
( y) ;
bool (const partial_date & rhs) ;
bool (const partial_date & rhs) ;
() ;
() ;
() ;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"