1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>Class date</title> |
---|
5 | <link rel="stylesheet" href="../../boostbook.css" type="text/css"> |
---|
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
7 | <link rel="start" href="../../index.html" title="The Boost C++ Libraries"> |
---|
8 | <link rel="up" href="../../date_time/doxy.html#id2482201" title="Header <boost/date_time/gregorian/greg_date.hpp>"> |
---|
9 | <link rel="prev" href="../../gregorian_calendar.html" title="Class gregorian_calendar"> |
---|
10 | <link rel="next" href="../../bad_day_of_month.html" title="Struct bad_day_of_month"> |
---|
11 | </head> |
---|
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
13 | <table cellpadding="2" width="100%"> |
---|
14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td> |
---|
15 | <td align="center"><a href="../../../../index.htm">Home</a></td> |
---|
16 | <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> |
---|
17 | <td align="center"><a href="../../../../people/people.htm">People</a></td> |
---|
18 | <td align="center"><a href="../../../../more/faq.htm">FAQ</a></td> |
---|
19 | <td align="center"><a href="../../../../more/index.htm">More</a></td> |
---|
20 | </table> |
---|
21 | <hr> |
---|
22 | <div class="spirit-nav"> |
---|
23 | <a accesskey="p" href="../../gregorian_calendar.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#id2482201"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../bad_day_of_month.html"><img src="../../images/next.png" alt="Next"></a> |
---|
24 | </div> |
---|
25 | <div class="refentry" lang="en"> |
---|
26 | <a name="boost.gregorian.date"></a><div class="titlepage"></div> |
---|
27 | <div class="refnamediv"> |
---|
28 | <h2><span class="refentrytitle">Class date</span></h2> |
---|
29 | <p>boost::gregorian::date — A date type based on gregorian_calendar. </p> |
---|
30 | </div> |
---|
31 | <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> |
---|
32 | <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"> |
---|
33 | <span class="bold"><strong>class</strong></span> date { |
---|
34 | <span class="bold"><strong>public</strong></span>: |
---|
35 | <span class="emphasis"><em>// types</em></span> |
---|
36 | <span class="bold"><strong>typedef</strong></span> gregorian_calendar::year_type year_type; |
---|
37 | <span class="bold"><strong>typedef</strong></span> gregorian_calendar::month_type month_type; |
---|
38 | <span class="bold"><strong>typedef</strong></span> gregorian_calendar::day_type day_type; |
---|
39 | <span class="bold"><strong>typedef</strong></span> gregorian_calendar::day_of_year_type day_of_year_type; |
---|
40 | <span class="bold"><strong>typedef</strong></span> gregorian_calendar::ymd_type ymd_type; |
---|
41 | <span class="bold"><strong>typedef</strong></span> gregorian_calendar::date_rep_type date_rep_type; |
---|
42 | <span class="bold"><strong>typedef</strong></span> gregorian_calendar::date_int_type date_int_type; |
---|
43 | <span class="bold"><strong>typedef</strong></span> date_duration duration_type; |
---|
44 | |
---|
45 | <span class="emphasis"><em>// <a href="date.html#boost.gregorian.dateconstruct-copy-destruct">construct/copy/destruct</a></em></span> |
---|
46 | <a href="date.html#id2452509-bb">date</a>(); |
---|
47 | <a href="date.html#id2452517-bb">date</a>(year_type, month_type, day_type); |
---|
48 | <a href="date.html#id2452555-bb">date</a>(<span class="bold"><strong>const</strong></span> ymd_type &); |
---|
49 | <a href="date.html#id2452573-bb">date</a>(<span class="bold"><strong>const</strong></span> date_int_type &); |
---|
50 | <a href="date.html#id2452590-bb">date</a>(date_rep_type); |
---|
51 | <a href="date.html#id2452608-bb">date</a>(special_values); |
---|
52 | |
---|
53 | <span class="emphasis"><em>// <a href="date.html#id2482311-bb">public member functions</a></em></span> |
---|
54 | <span class="type">date_int_type</span> <a href="date.html#id2482315-bb">julian_day</a>() <span class="bold"><strong>const</strong></span>; |
---|
55 | <span class="type">day_of_year_type</span> <a href="date.html#id2482331-bb">day_of_year</a>() <span class="bold"><strong>const</strong></span>; |
---|
56 | <span class="type"><span class="bold"><strong>long</strong></span></span> <a href="date.html#id2482348-bb">modjulian_day</a>() <span class="bold"><strong>const</strong></span>; |
---|
57 | <span class="type"><span class="bold"><strong>int</strong></span></span> <a href="date.html#id2482366-bb">week_number</a>() <span class="bold"><strong>const</strong></span>; |
---|
58 | <span class="type">date_int_type</span> <a href="date.html#id2482382-bb">day_number</a>() <span class="bold"><strong>const</strong></span>; |
---|
59 | <span class="type"><a href="date.html" title="Class date">date</a></span> <a href="date.html#id2452488-bb">end_of_month</a>() <span class="bold"><strong>const</strong></span>; |
---|
60 | };</pre></div> |
---|
61 | <div class="refsect1" lang="en"> |
---|
62 | <a name="id2668757"></a><h2>Description</h2> |
---|
63 | <p>This class is the primary interface for programming with greogorian dates. The is a lightweight type that can be freely passed by value. All comparison operators are supported. </p> |
---|
64 | <div class="refsect2" lang="en"> |
---|
65 | <a name="id2668765"></a><h3> |
---|
66 | <a name="boost.gregorian.dateconstruct-copy-destruct"></a><code class="computeroutput">date</code> construct/copy/destruct</h3> |
---|
67 | <div class="orderedlist"><ol type="1"> |
---|
68 | <li><pre class="literallayout"><a name="id2452509-bb"></a>date();</pre></li> |
---|
69 | <li><pre class="literallayout"><a name="id2452517-bb"></a>date(year_type y, month_type m, day_type d);</pre></li> |
---|
70 | <li><pre class="literallayout"><a name="id2452555-bb"></a>date(<span class="bold"><strong>const</strong></span> ymd_type & ymd);</pre></li> |
---|
71 | <li><pre class="literallayout"><a name="id2452573-bb"></a>date(<span class="bold"><strong>const</strong></span> date_int_type & rhs);</pre></li> |
---|
72 | <li><pre class="literallayout"><a name="id2452590-bb"></a>date(date_rep_type rhs);</pre></li> |
---|
73 | <li><pre class="literallayout"><a name="id2452608-bb"></a>date(special_values sv);</pre></li> |
---|
74 | </ol></div> |
---|
75 | </div> |
---|
76 | <div class="refsect2" lang="en"> |
---|
77 | <a name="id2668883"></a><h3> |
---|
78 | <a name="id2482311-bb"></a><code class="computeroutput">date</code> public member functions</h3> |
---|
79 | <div class="orderedlist"><ol type="1"> |
---|
80 | <li><pre class="literallayout"><span class="type">date_int_type</span> <a name="id2482315-bb"></a>julian_day() <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
81 | <li><pre class="literallayout"><span class="type">day_of_year_type</span> <a name="id2482331-bb"></a>day_of_year() <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
82 | <li><pre class="literallayout"><span class="type"><span class="bold"><strong>long</strong></span></span> <a name="id2482348-bb"></a>modjulian_day() <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
83 | <li><pre class="literallayout"><span class="type"><span class="bold"><strong>int</strong></span></span> <a name="id2482366-bb"></a>week_number() <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
84 | <li><pre class="literallayout"><span class="type">date_int_type</span> <a name="id2482382-bb"></a>day_number() <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
85 | <li><pre class="literallayout"><span class="type"><a href="date.html" title="Class date">date</a></span> <a name="id2452488-bb"></a>end_of_month() <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
86 | </ol></div> |
---|
87 | </div> |
---|
88 | </div> |
---|
89 | </div> |
---|
90 | <table width="100%"><tr> |
---|
91 | <td align="left"></td> |
---|
92 | <td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td> |
---|
93 | </tr></table> |
---|
94 | <hr> |
---|
95 | <div class="spirit-nav"> |
---|
96 | <a accesskey="p" href="../../gregorian_calendar.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#id2482201"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../../bad_day_of_month.html"><img src="../../images/next.png" alt="Next"></a> |
---|
97 | </div> |
---|
98 | </body> |
---|
99 | </html> |
---|