Boost C++ Libraries 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.

Class greg_year

boost::gregorian::greg_year — Represent a day of the month (range 1900 - 10000).


class greg_year {
// construct/copy/destruct
greg_year(unsigned short);

// public member functions
operator unsigned short() const;


This small class allows for simple conversion an integer value into a year for the gregorian calendar. This currently only allows a range of 1900 to 10000. 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 construct/copy/destruct

  1. greg_year(unsigned short year);

greg_year public member functions

  1. operator unsigned short() const;
Copyright 2001-2005 CrystalClear Software, Inc