Logo Search packages:      
Sourcecode: passenger version File versions  Download package

template<class date_type, class CharT, class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_generator_formatter< date_type, CharT, OutItrT >::elements ( const collection_type &  new_strings,
phrase_elements  beg_pos = first 
) [inline]

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:

  • "final", "prior", "following", "in". The beg_pos of date_generator_formatter::last would be used.

Definition at line 112 of file date_generator_formatter.hpp.

        if(beg_pos < number_of_phrase_elements) {
          typename collection_type::iterator itr = phrase_strings.begin();
          itr += beg_pos;
          std::copy(new_strings.begin(), new_strings.end(),

Generated by  Doxygen 1.6.0   Back to index