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 to view this page for the latest version.
PrevUpHomeNext

Class greg_year

boost::gregorian::greg_year — Represent a year (range 1400 - 9999)

Synopsis

// In header: <boost/date_time/gregorian/greg_year.hpp>


class greg_year : public greg_year_rep {
public:
  // construct/copy/destruct
  greg_year(value_type);

  // public member functions
  operator value_type() const;
};

Description

This small class allows for simple conversion an integer value into a year for the gregorian calendar. This currently only allows a range of 1400 to 9999. Both ends of the range are a bit arbitrary at the moment, but they are the limits of current testing of the library. As such they may be increased in the future.

greg_year public construct/copy/destruct

  1. greg_year(value_type year);

greg_year public member functions

  1. operator value_type() const;

PrevUpHomeNext