Files
date_time/doc/class_gregorian_calendar.html
2002-09-05 17:17:25 +00:00

88 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>gregorian::gregorian_calendar Documentation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body>
<a href="../../../index.htm">
<img align="left" src="../../../c++boost.gif" alt="C++ Boost">
</a>
<h1>gregorian::gregorian_calendar</h1>
<p>&nbsp;<p>
<hr>
<p>
<p>
<a href="index.html">Overall Index</a> --
<a href="gregorian.html">Gregorian Index</a> --
<a href="posix_time.html">Posix Time Index</a>
<p>
<font class="bold">Date Documentation</font>
<p>
<a href="class_gregorian_calendar.html#header">Header</a> --
<a href="class_gregorian_calendar.html#functions">Functions</a>
<p>
<h2><a name="intro">Introduction</a></h2>
<p>
The class boost::gregorian::gregorian_calendar implements the functions
necessary to create the gregorian date system. It converts to
the year-month-day form of a date to a day number representation
and back.
<p>
For most purposes this class is simply accessed by
<a href="class_date.html">gregorian::date</a> and is not used directly
by the user. However, there are useful functions that
might be of use such as the <font class="func">end_of_month_day</font>
function.
<p>
The <a href="exp-print_month.html">print month</a> example demonstrates this.
<p>
<h2><a name="header">Header</a></h2>
<pre>
#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
or
#include "boost/date_time/gregorian/gregorian_types.hpp" //no i/o just types
</pre>
<p>
<h2><a name="functions">Functions</a></h2>
<p>
<table border=1 cellspacing=3 cellpadding=3>
<tr><td><b>Syntax</b></td><td><b>Description</b></td><td><b>Example</b></td></tr>
<tr><td>static short <font class="func">day_of_week</font>(ymd_type)</td>
<td>Return the day of the week (0==Sunday, 1==Monday, etc)</td>
<td>See also gregorian::date day_of_week</td></tr>
<tr><td>static date_int_type <font class="func">day_number</font>(ymd_type)</td>
<td> Convert a ymd_type into a day number. The day number is an absolute number of days since the epoch start.</td>
<td></td></tr>
<tr><td>static short <font class="func">end_of_month_day</font>(year_type, month_type)</td>
<td>Given a year and month determine the last day of the month.</td>
<td></td></tr>
<tr><td>static ymd_type <font class="func">from_day_number</font>(date_int_type)</td>
<td> Convert a day number to a ymd struct. </td>
<td></td></tr>
<tr><td>static bool <font class="func">is_leap_year</font>(year_type)</td>
<td>Returns true if specified year is a leap year.</td>
<td>gregorian_calendar::is_leap_year(2000) --> true</td></tr>
</table>
<p>
<hr>
<address><small>
<!-- hhmts start -->
Last modified: Thu Sep 5 06:05:54 MST 2002
<!-- hhmts end -->
by <a href="mailto:jeff&#64;crystalclearsoftware.com">Jeff Garland</a> &copy; 2000-2002
</small></address>
</body>
</html>