Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Function template gather_month_strings

boost::date_time::gather_month_strings — This function gathers up all the month strings from a std::locale.

Synopsis

template<typename charT> 
  std::vector< std::basic_string< charT > > 
  gather_month_strings(const std::locale & locale, bool short_strings = true);

Description

Using the time_put facet, this function creates a collection of all the month strings from a locale. This is handy when building custom date parsers or formatters that need to be localized.

Parameters:

locale

The locale to use when gathering the strings

short_strings

True(default) to gather short strings, false for long strings.

Returns:

A vector of strings containing the strings in order. eg: Jan, Feb, Mar, etc.


PrevUpHomeNext