boost::date_time::date_generator_formatter — Formats date_generators for output.
Synopsis
// In header: <boost/date_time/date_generator_formatter.hpp>
template<typename date_type,typename CharT,typename OutItrT =std::ostreambuf_iterator<CharT,std::char_traits<CharT>>>classdate_generator_formatter{public:// typestypedefpartial_date<date_type>partial_date_type;typedefnth_kday_of_month<date_type>nth_kday_type;typedeffirst_kday_of_month<date_type>first_kday_type;typedeflast_kday_of_month<date_type>last_kday_type;typedeffirst_kday_after<date_type>kday_after_type;typedeffirst_kday_before<date_type>kday_before_type;typedefCharTchar_type;typedefstd::basic_string<char_type>string_type;typedefstd::vector<string_type>collection_type;enumphrase_elements { first = =0, second, third, fourth, fifth, last,
before, after, of, number_of_phrase_elements };// construct/copy/destructdate_generator_formatter();date_generator_formatter(conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&);// public member functionsvoidelements(constcollection_type&,phrase_elements=first);template<typename facet_type>OutItrTput_partial_date(OutItrT,std::ios_base&,CharT,constpartial_date_type&,constfacet_type&)const;template<typename facet_type>OutItrTput_nth_kday(OutItrT,std::ios_base&,CharT,constnth_kday_type&,constfacet_type&)const;template<typename facet_type>OutItrTput_first_kday(OutItrT,std::ios_base&,CharT,constfirst_kday_type&,constfacet_type&)const;template<typename facet_type>OutItrTput_last_kday(OutItrT,std::ios_base&,CharT,constlast_kday_type&,constfacet_type&)const;template<typename facet_type>OutItrTput_kday_before(OutItrT,std::ios_base&,CharT,constkday_before_type&,constfacet_type&)const;template<typename facet_type>OutItrTput_kday_after(OutItrT,std::ios_base&,CharT,constkday_after_type&,constfacet_type&)const;// private member functionsOutItrTput_string(OutItrT,conststring_type&)const;// public data membersstaticconstchar_typefirst_string;staticconstchar_typesecond_string;staticconstchar_typethird_string;staticconstchar_typefourth_string;staticconstchar_typefifth_string;staticconstchar_typelast_string;staticconstchar_typebefore_string;staticconstchar_typeafter_string;staticconstchar_typeof_string;};
Description
Форматирование генераторов дат выполняет конкретные заказы для различных типов генераторов дат.
nth_day_of_the_week_in_month =>«день недели месяца»
first_day_of_the_week_in_month =>"первый будний день месяца"
Last_day_of_the_week_in_month =>"Последний будний день месяца"
first_day_of_the_week_after =>"weekday after"
first_day_of_the_week_before =>"за день до" Хотя порядок элементов в этих фразах не может быть изменен, сами элементы могут быть изменены. День недели и месяц получают свои форматы и имена изdate_facet. Остальные элементы хранятся вdate_generator_formatterи могут быть настроены при строительстве или через функцию члена. Элементами по умолчанию являются те, которые показаны в примерах выше.
date_generator_formatter
public
construct/copy/destruct
>функция помощника, чтобы поместить различные строки в поток
Статья Class template date_generator_formatter раздела The Boost C++ Libraries BoostBook Documentation Subset Library Reference может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.