...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::gregorian::greg_month — Wrapper class to represent months in gregorian based calendar.
// In header: <boost/date_time/gregorian/greg_month.hpp> class greg_month { public: // types typedef date_time::months_of_year month_enum; typedef std::map< std::string, unsigned short > month_map_type; typedef boost::shared_ptr< month_map_type > month_map_ptr_type; // construct/copy/destruct greg_month(month_enum); greg_month(unsigned short); // public member functions operator unsigned short() const; unsigned short as_number() const; month_enum as_enum() const; const char * as_short_string() const; const char * as_long_string() const; const wchar_t * as_short_wstring() const; const wchar_t * as_long_wstring() const; const char * as_short_string(char) const; const char * as_long_string(char) const; const wchar_t * as_short_string(wchar_t) const; const wchar_t * as_long_string(wchar_t) const; // public static functions static month_map_ptr_type get_month_map_ptr() ; };
greg_month
public member functionsoperator unsigned short() const;Convert the value back to a short.
unsigned short as_number() const;Returns month as number from 1 to 12.
month_enum as_enum() const;
const char * as_short_string() const;
const char * as_long_string() const;
const wchar_t * as_short_wstring() const;
const wchar_t * as_long_wstring() const;
const char * as_short_string(char) const;
const char * as_long_string(char) const;
const wchar_t * as_short_string(wchar_t) const;
const wchar_t * as_long_string(wchar_t) const;