summaryrefslogtreecommitdiff
path: root/doc/html/date_time/gregorian.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/date_time/gregorian.html')
-rw-r--r--doc/html/date_time/gregorian.html80
1 files changed, 40 insertions, 40 deletions
diff --git a/doc/html/date_time/gregorian.html b/doc/html/date_time/gregorian.html
index d31bf42b05..4e11573811 100644
--- a/doc/html/date_time/gregorian.html
+++ b/doc/html/date_time/gregorian.html
@@ -4,9 +4,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Gregorian</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
-<link rel="up" href="../date_time.html" title="Chapter&#160;9.&#160;Boost.Date_Time">
+<link rel="up" href="../date_time.html" title="Chapter&#160;10.&#160;Boost.Date_Time">
<link rel="prev" href="examples/general_usage_examples.html" title="General Usage Examples">
<link rel="next" href="posix_time.html" title="Posix Time">
</head>
@@ -26,7 +26,7 @@
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="date_time.gregorian"></a>Gregorian</h2></div></div></div>
-<div class="toc"><dl>
+<div class="toc"><dl class="toc">
<dt><span class="section"><a href="gregorian.html#date_time.gregorian.date_class">Date</a></span></dt>
<dt><span class="section"><a href="gregorian.html#date_time.gregorian.date_duration">Date Duration (aka Days)</a></span></dt>
<dt><span class="section"><a href="gregorian.html#date_time.gregorian.date_period">Date Period</a></span></dt>
@@ -35,13 +35,13 @@
<dt><span class="section"><a href="gregorian.html#date_time.gregorian.gregorian_calendar">Gregorian Calendar</a></span></dt>
</dl></div>
<h3>
-<a name="idp102002288"></a>Gregorian Date System</h3>
+<a name="idm45928087136720"></a>Gregorian Date System</h3>
<p>
<a class="link" href="gregorian.html#greg_intro">Introduction</a> --
<a class="link" href="gregorian.html#greg_ex">Usage Examples</a>
</p>
<a name="greg_intro"></a><h4>
-<a name="idp102006064"></a>Introduction</h4>
+<a name="idm45928087133008"></a>Introduction</h4>
<p>The gregorian date system provides a date programming system based the Gregorian Calendar. The first introduction of the Gregorian calendar was in 1582 to fix an error in the Julian Calendar. However, many local jurisdictions did not adopt this change until much later. Thus there is potential confusion with historical dates.
</p>
<p>The implemented calendar is a "proleptic Gregorian calendar" which extends dates back prior to the Gregorian Calendar's first adoption in 1582. The current implementation supports dates in the range 1400-Jan-01 to 9999-Dec-31. Many references will represent dates prior to 1582 using the Julian Calendar, so caution is in order if accurate calculations are required on historic dates. See <a href="http://emr.cs.iit.edu/home/reingold/calendar-book/second-edition" target="_top">Calendrical Calculations</a> by Reingold &amp; Dershowitz for more details. Date information from Calendrical Calculations has been used to cross-test the correctness of the Gregorian calendar implementation.
@@ -51,7 +51,7 @@
<p>The class <a class="link" href="gregorian.html#date_time.gregorian.date_class" title="Date">boost::gregorian::date</a> is the primary temporal type for users. If you are interested in learning about writing programs that do specialized date calculations such as finding the "first sunday in april" see the date <a class="link" href="gregorian.html#date_time.gregorian.date_algorithms" title="Date Generators/Algorithms">generators and algorithms page</a>.
</p>
<a name="greg_ex"></a><h4>
-<a name="idp102013552"></a>Usage Examples</h4>
+<a name="idm45928087125520"></a>Usage Examples</h4>
<p>
</p>
<div class="informaltable"><table class="table">
@@ -102,7 +102,7 @@
<a class="link" href="gregorian.html#date_convert_to_string">Convert to String</a> --
<a class="link" href="gregorian.html#date_operators">Operators</a> --
<a class="link" href="gregorian.html#date_tm_funcs">Struct tm Functions</a><a name="date_intro"></a><h4>
-<a name="idp102044544"></a>Introduction</h4>
+<a name="idm45928087094448"></a>Introduction</h4>
<p>
The class boost::gregorian::date is the primary interface for date programming. In general,
the date class is immutable once constructed although it does allow assignment from another
@@ -125,7 +125,7 @@
special value not-a-date-time can be used as 'invalid' or 'null' date if so desired.
</p>
<a name="date_header"></a><h4>
-<a name="idp102050800"></a>Header</h4>
+<a name="idm45928087088144"></a>Header</h4>
<p>
</p>
<pre class="programlisting">#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
@@ -134,7 +134,7 @@ or
<p>
</p>
<a name="date_construction"></a><h4>
-<a name="idp102053392"></a>Construction</h4>
+<a name="idm45928087085552"></a>Construction</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -175,7 +175,7 @@ date d5(min_date_time);</pre></td></tr>
</tbody>
</table></div>
<a name="date_construct_from_string"></a><h4>
-<a name="idp102073120"></a>Construct from String</h4>
+<a name="idm45928087065888"></a>Construct from String</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -204,7 +204,7 @@ date d(from_undelimited_string(ds));</pre></td></tr>
</tbody>
</table></div>
<a name="date_construct_from_clock"></a><h4>
-<a name="idp102085808"></a>Construct from Clock</h4>
+<a name="idm45928087053136"></a>Construct from Clock</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -231,7 +231,7 @@ date d(from_undelimited_string(ds));</pre></td></tr>
</tbody>
</table></div>
<a name="date_accessors"></a><h4>
-<a name="idp102098304"></a>Accessors</h4>
+<a name="idm45928087040576"></a>Accessors</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -355,7 +355,7 @@ date eom = d.end_of_month();</pre></td></tr>
</tbody>
</table></div>
<a name="date_convert_to_string"></a><h4>
-<a name="idp102164144"></a>Convert to String</h4>
+<a name="idm45928086974736"></a>Convert to String</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -387,7 +387,7 @@ date eom = d.end_of_month();</pre></td></tr>
</tbody>
</table></div>
<a name="date_operators"></a><h4>
-<a name="idp102182912"></a>Operators</h4>
+<a name="idm45928086955968"></a>Operators</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -455,7 +455,7 @@ date_duration dd = d2-d1;</pre>
</tbody>
</table></div>
<a name="date_tm_funcs"></a><h4>
-<a name="idp102211568"></a>Struct tm Functions</h4>
+<a name="idm45928086927248"></a>Struct tm Functions</h4>
<p>Functions for converting a <code class="computeroutput">date</code> object to, and from, a <code class="computeroutput">tm</code> struct are provided.</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -511,7 +511,7 @@ date d = date_from_tm(d_tm);
<a class="link" href="gregorian.html#duration_accessors">Accessors</a> --
<a class="link" href="gregorian.html#duration_operators">Operators</a> --
<a class="link" href="gregorian.html#additional_duration_types">Additional Duration Types</a><a name="duration_intro"></a><h4>
-<a name="idp102243808"></a>Introduction</h4>
+<a name="idm45928086895088"></a>Introduction</h4>
<p>
The class boost::gregorian::date_duration is a simple day count used for arithmetic with <a class="link" href="gregorian.html#date_time.gregorian.date_class" title="Date">gregorian::date</a>. A duration can be either positive or negative.
</p>
@@ -519,7 +519,7 @@ date d = date_from_tm(d_tm);
As of version 1_32 the date_duration class has been typedef'd as days in the boost::gregorian namespace. Throughout the examples you will find days used instead of date_duration.
</p>
<a name="duration_header"></a><h4>
-<a name="idp102247152"></a>Header</h4>
+<a name="idm45928086891680"></a>Header</h4>
<p>
</p>
<pre class="programlisting">#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
@@ -528,7 +528,7 @@ or
<p>
</p>
<a name="duration_construction"></a><h4>
-<a name="idp102249744"></a>Construction</h4>
+<a name="idm45928086889088"></a>Construction</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -559,7 +559,7 @@ days dd5(min_date_time);</pre></td></tr>
</tbody>
</table></div>
<a name="duration_accessors"></a><h4>
-<a name="idp102262368"></a>Accessors</h4>
+<a name="idm45928086876528"></a>Accessors</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -602,7 +602,7 @@ dd3.is_special(); // --&gt; false</pre></td></tr>
</tbody>
</table></div>
<a name="duration_operators"></a><h4>
-<a name="idp102282464"></a>Operators</h4>
+<a name="idm45928086856432"></a>Operators</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -657,7 +657,7 @@ date_duration dd3 = dd1 - dd2;</pre>
</tbody>
</table></div>
<a name="additional_duration_types"></a><h4>
-<a name="idp102304272"></a>Additional Duration Types</h4>
+<a name="idm45928086834624"></a>Additional Duration Types</h4>
<p>These additional types are logical representations of spans of days.</p>
<div class="informaltable"><table class="table">
<colgroup>
@@ -705,7 +705,7 @@ date(2005,Jan,1) + single; // =&gt; 2005-Jan-08</pre></td></tr>
<a name="snap_to_details"></a>
</p>
<h5>
-<a name="idp102326592"></a>Reversibility of Operations Pitfall</h5>
+<a name="idm45928086812352"></a>Reversibility of Operations Pitfall</h5>
<p>
</p>
<p>A natural expectation when adding a number of months to a date, and then subtracting the same number of months, is to end up exactly where you started. This is most often the result the <code class="computeroutput">date_time</code> library provides but there is one significant exception: The snap-to-end-of-month behavior implemented by the <a class="link" href="gregorian.html#additional_duration_types">months</a> duration type. The <a class="link" href="gregorian.html#additional_duration_types">months</a> duration type may provide unexpected results when the starting day is the 28th, 29th, or 30th in a 31 day month. The <a class="link" href="gregorian.html#iterators_intro">month_iterator</a> is not affected by this issue and is therefore included in the examples to illustrate a possible alternative.
@@ -771,7 +771,7 @@ date(2005,Jan,1) + single; // =&gt; 2005-Jan-08</pre></td></tr>
<a class="link" href="gregorian.html#period_accessors">Accessors</a> --
<a class="link" href="gregorian.html#period_convert_to_string">Convert to String</a> --
<a class="link" href="gregorian.html#period_operators">Operators</a><a name="period_intro"></a><h4>
-<a name="idp102347808"></a>Introduction</h4>
+<a name="idm45928086791296"></a>Introduction</h4>
<p>
The class boost::gregorian::date_period provides direct representation for ranges between two dates. Periods provide the ability to simplify some types of calculations by simplifying the conditional logic of the program. For example, testing if a date is within an irregular schedule such as a weekend or holiday can be accomplished using collections of date periods. This is facilitated by several methods that allow evaluation if a date_period intersects with another date period, and to generate the period resulting from the intersection. The <a class="link" href="examples.html#date_time.examples.date_period_calc" title="Date Period Calculations">date period calculation example</a> provides an example of this.
</p>
@@ -782,7 +782,7 @@ date(2005,Jan,1) + single; // =&gt; 2005-Jan-08</pre></td></tr>
Date periods used in combination with infinity values have the ability to represent complex concepts such as 'until further notice'.
</p>
<a name="period_header"></a><h4>
-<a name="idp102353712"></a>Header</h4>
+<a name="idm45928086785392"></a>Header</h4>
<p>
</p>
<pre class="programlisting">#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
@@ -791,7 +791,7 @@ or
<p>
</p>
<a name="period_construction"></a><h4>
-<a name="idp102356304"></a>Construction</h4>
+<a name="idm45928086782800"></a>Construction</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -825,7 +825,7 @@ or
</tbody>
</table></div>
<a name="date_period_mutators"></a><h4>
-<a name="idp102372432"></a>Mutators</h4>
+<a name="idm45928086766672"></a>Mutators</h4>
<p>
</p>
<div class="informaltable"><table class="table">
@@ -868,7 +868,7 @@ dp.expand(days(1));
<p>
</p>
<a name="period_accessors"></a><h4>
-<a name="idp102386112"></a>Accessors</h4>
+<a name="idm45928086752992"></a>Accessors</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -1050,7 +1050,7 @@ dp1.expand(days(2));
</tbody>
</table></div>
<a name="period_convert_to_string"></a><h4>
-<a name="idp102450528"></a>Convert to String</h4>
+<a name="idm45928086688576"></a>Convert to String</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -1072,7 +1072,7 @@ dp1.expand(days(2));
</tbody>
</table></div>
<a name="period_operators"></a><h4>
-<a name="idp102461136"></a>Operators</h4>
+<a name="idm45928086677968"></a>Operators</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -1123,7 +1123,7 @@ operator&gt;, operator&lt;</pre>
<a class="link" href="gregorian.html#iterators_intro">Introduction</a> --
<a class="link" href="gregorian.html#iterators_header">Header</a> --
<a class="link" href="gregorian.html#iterators_overview">Overview</a><a name="iterators_intro"></a><h4>
-<a name="idp102488064"></a>Introduction</h4>
+<a name="idm45928086651040"></a>Introduction</h4>
<p>
Date iterators provide a standard mechanism for iteration through dates. Date iterators are a model of <a href="http://www.sgi.com/tech/stl/BidirectionalIterator.html" target="_top">Bidirectional Iterator</a> and can be used to populate collections with dates and other date generation tasks. For example, the <a class="link" href="examples.html#date_time.examples.print_month" title="Print Month">print month</a> example iterates through all the days in a month and prints them.
</p>
@@ -1131,7 +1131,7 @@ operator&gt;, operator&lt;</pre>
All of the iterators here derive from boost::gregorian::date_iterator.
</p>
<a name="iterators_header"></a><h4>
-<a name="idp102492192"></a>Header</h4>
+<a name="idm45928086646944"></a>Header</h4>
<p>
</p>
<pre class="programlisting">#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
@@ -1140,7 +1140,7 @@ or
<p>
</p>
<a name="iterators_overview"></a><h4>
-<a name="idp102494784"></a>Overview</h4>
+<a name="idm45928086644352"></a>Overview</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -1207,12 +1207,12 @@ year_iterator 2y_itr(date(2005,Feb,1),2);
<div class="titlepage"><div><div><h3 class="title">
<a name="date_time.gregorian.date_algorithms"></a>Date Generators/Algorithms</h3></div></div></div>
<h3>
-<a name="idp102523696"></a>Date Generators/Algorithms</h3>
+<a name="idm45928086615488"></a>Date Generators/Algorithms</h3>
<a class="link" href="gregorian.html#algo_intro">Introduction</a> --
<a class="link" href="gregorian.html#algo_header">Header</a> --
<a class="link" href="gregorian.html#algo_overview">Class Overview</a> --
<a class="link" href="gregorian.html#algo_func_overview">Function Overview</a><a name="algo_intro"></a><h4>
-<a name="idp102529008"></a>Introduction</h4>
+<a name="idm45928086610176"></a>Introduction</h4>
<p>
Date algorithms or generators are tools for generating other dates or schedules of dates. A generator function starts with some part of a date such as a month and day and is supplied another part to then generate a concrete date. This allows the programmer to represent concepts such as "The first Sunday in February" and then create a concrete set of dates when provided with one or more years.
<span class="emphasis"><em>Note</em></span>: As of boost version 1_31_0, date generator names have been changed. Old names are still available but are no longer documented and may someday be deprecated
@@ -1225,12 +1225,12 @@ year_iterator 2y_itr(date(2005,Feb,1),2);
The <a class="link" href="examples.html#date_time.examples.print_holidays" title="Print Holidays">print holidays</a> example shows a detailed usage example.
</p>
<a name="algo_header"></a><h4>
-<a name="idp102534192"></a>Header</h4>
+<a name="idm45928086604576"></a>Header</h4>
<pre class="programlisting">#include "boost/date_time/gregorian/gregorian.hpp"</pre>
<p>
</p>
<a name="algo_overview"></a><h4>
-<a name="idp102536544"></a>Overview</h4>
+<a name="idm45928086602224"></a>Overview</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -1319,7 +1319,7 @@ date d = fdbf.get_date(date(2002,Feb,1));
</tbody>
</table></div>
<a name="algo_func_overview"></a><h4>
-<a name="idp102572240"></a>Function Overview</h4>
+<a name="idm45928086566528"></a>Function Overview</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -1384,7 +1384,7 @@ previous_weekday(d, gw2); // 2004-Jun-1
<a class="link" href="gregorian.html#gregcal_intro">Introduction</a> --
<a class="link" href="gregorian.html#gregcal_header">Header</a> --
<a class="link" href="gregorian.html#gregcal_functions">Functions</a><a name="gregcal_intro"></a><h4>
-<a name="idp102596960"></a>Introduction</h4>
+<a name="idm45928086541872"></a>Introduction</h4>
<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>
@@ -1395,7 +1395,7 @@ previous_weekday(d, gw2); // 2004-Jun-1
The <a class="link" href="examples.html#date_time.examples.print_month" title="Print Month">print month</a> example demonstrates this.
</p>
<a name="gregcal_header"></a><h4>
-<a name="idp102601712"></a>Header</h4>
+<a name="idm45928086537120"></a>Header</h4>
<p>
</p>
<pre class="programlisting">#include "boost/date_time/gregorian/gregorian.hpp" //include all types plus i/o
@@ -1404,7 +1404,7 @@ or
<p>
</p>
<a name="gregcal_functions"></a><h4>
-<a name="idp102604240"></a>Functions</h4>
+<a name="idm45928086534528"></a>Functions</h4>
<div class="informaltable"><table class="table">
<colgroup>
<col>