Class template period_formatterboost::date_time::period_formatter — Not a facet, but a class used to specify and control period formats. Synopsistemplate<typename CharT, typename OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> > > class period_formatter { public: // types typedef std::basic_string< CharT > string_type; typedef CharT char_type; typedef std::basic_string< char_type >::const_iterator const_itr_type; typedef std::vector< std::basic_string< CharT > > collection_type; enum range_display_options { AS_OPEN_RANGE, AS_CLOSED_RANGE }; // construct/copy/destruct period_formatter(range_display_options = AS_CLOSED_RANGE, const char_type *const = default_period_separator, const char_type *const = default_period_start_delimeter, const char_type *const = default_period_open_range_end_delimeter, const char_type *const = default_period_closed_range_end_delimeter); // public member functions OutItrT put_period_separator(OutItrT &) const; OutItrT put_period_start_delimeter(OutItrT &) const; OutItrT put_period_end_delimeter(OutItrT &) const; range_display_options range_option() const; void range_option(range_display_options) const; void delimiter_strings(const string_type &, const string_type &, const string_type &, const string_type &) ; template<typename period_type, typename facet_type> OutItrT put_period(OutItrT, std::ios_base &, char_type, const period_type &, const facet_type &) const; static const char_type default_period_separator; static const char_type default_period_start_delimeter; static const char_type default_period_open_range_end_delimeter; static const char_type default_period_closed_range_end_delimeter; }; DescriptionProvides settings for the following:
Thus the default formatting for a period is as follows: [period.start()/period.last()] * So for a typical date_period this would be [2004-Jan-04/2004-Feb-01] * where the date formatting is controlled by the date facet
|