|
| date_generator_formatter () |
| Default format elements used. More...
|
|
| date_generator_formatter (const string_type &first_str, const string_type &second_str, const string_type &third_str, const string_type &fourth_str, const string_type &fifth_str, const string_type &last_str, const string_type &before_str, const string_type &after_str, const string_type &of_str) |
| Constructor that allows for a custom set of phrase elements. More...
|
|
void | elements (const collection_type &new_strings, phrase_elements beg_pos=first) |
| Replace the set of phrase elements with those contained in new_strings. More...
|
|
template<class facet_type > |
OutItrT | put_partial_date (OutItrT next, std::ios_base &a_ios, CharT a_fill, const partial_date_type &pd, const facet_type &facet) const |
| Put a partial_date => "dd Month". More...
|
|
template<class facet_type > |
OutItrT | put_nth_kday (OutItrT next, std::ios_base &a_ios, CharT a_fill, const nth_kday_type &nkd, const facet_type &facet) const |
| Put an nth_day_of_the_week_in_month => "nth weekday of month". More...
|
|
template<class facet_type > |
OutItrT | put_first_kday (OutItrT next, std::ios_base &a_ios, CharT a_fill, const first_kday_type &fkd, const facet_type &facet) const |
| Put a first_day_of_the_week_in_month => "first weekday of month". More...
|
|
template<class facet_type > |
OutItrT | put_last_kday (OutItrT next, std::ios_base &a_ios, CharT a_fill, const last_kday_type &lkd, const facet_type &facet) const |
| Put a last_day_of_the_week_in_month => "last weekday of month". More...
|
|
template<class facet_type > |
OutItrT | put_kday_before (OutItrT next, std::ios_base &a_ios, CharT a_fill, const kday_before_type &fkb, const facet_type &facet) const |
| Put a first_day_of_the_week_before => "weekday before". More...
|
|
template<class facet_type > |
OutItrT | put_kday_after (OutItrT next, std::ios_base &a_ios, CharT a_fill, const kday_after_type &fka, const facet_type &facet) const |
| Put a first_day_of_the_week_after => "weekday after". More...
|
|
template<class date_type, class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
class boost::date_time::date_generator_formatter< date_type, CharT, OutItrT >
Formats date_generators for output.
Formatting of date_generators follows specific orders for the various types of date_generators.
- partial_date => "dd Month"
- nth_day_of_the_week_in_month => "nth weekday of month"
- first_day_of_the_week_in_month => "first weekday of month"
- last_day_of_the_week_in_month => "last weekday of month"
- first_day_of_the_week_after => "weekday after"
- first_day_of_the_week_before => "weekday before" While the order of the elements in these phrases cannot be changed, the elements themselves can be. Weekday and Month get their formats and names from the date_facet. The remaining elements are stored in the date_generator_formatter and can be customized upon construction or via a member function. The default elements are those shown in the examples above.
template<class date_type, class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
Replace the set of phrase elements with those contained in new_strings.
The order of the strings in the given collection is important. They must follow:
- first, second, third, fourth, fifth, last, before, after, of.
It is not necessary to send in a complete set if only a few elements are to be replaced as long as the correct beg_pos is used.
Ex: To keep the default first through fifth elements, but replace the rest with a collection of:
Referenced by boost::date_time::date_facet< time_type::date_type, CharT, OutItrT >::date_gen_phrase_strings().