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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Class template ymd_formatter

boost::date_time::ymd_formatter — Convert ymd to a standard string formatting policies.

Synopsis

// In header: <boost/date_time/date_formatting_limited.hpp>

template<typename ymd_type, typename format_type> 
class ymd_formatter {
public:

  // public static functions
  static std::string ymd_to_string(ymd_type);
  static std::basic_string< charT > ymd_to_string(ymd_type);
};

Description

ymd_formatter public static functions

  1. static std::string ymd_to_string(ymd_type ymd);
    Convert ymd to a standard string formatting policies.

    This is standard code for handling date formatting with year-month-day based date information. This function uses the format_type to control whether the string will contain separator characters, and if so what the character will be. In addtion, it can format the month as either an integer or a string as controled by the formatting policy

  2. static std::basic_string< charT > ymd_to_string(ymd_type ymd);
    Convert ymd to a standard string formatting policies.

    This is standard code for handling date formatting with year-month-day based date information. This function uses the format_type to control whether the string will contain separator characters, and if so what the character will be. In addtion, it can format the month as either an integer or a string as controled by the formatting policy


PrevUpHomeNext