blob: 507868b619d49a8c6d14492b8fea91a219e40977 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Class template date_duration</title>
<link rel="stylesheet" href="boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id729918" title="Header <boost/date_time/date_duration.hpp>">
<link rel="prev" href="day_clock.html" title="Class template day_clock">
<link rel="next" href="duration_traits_long.html" title="Struct duration_traits_long">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.htm">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../people/people.htm">People</a></td>
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="day_clock.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id729918"><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="duration_traits_long.html"><img src="images/next.png" alt="Next"></a>
</div>
<div class="refentry" lang="en">
<a name="date_duration"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template date_duration</span></h2>
<p>boost::date_time::date_duration — Duration type with date level resolution. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> duration_rep_traits>
<span class="bold"><strong>class</strong></span> date_duration {
<span class="bold"><strong>public</strong></span>:
<span class="emphasis"><em>// types</em></span>
<span class="bold"><strong>typedef</strong></span> duration_rep_traits::int_type duration_rep_type;
<span class="bold"><strong>typedef</strong></span> duration_rep_traits::impl_type duration_rep;
<span class="emphasis"><em>// <a href="date_duration.html#date_durationconstruct-copy-destruct">construct/copy/destruct</a></em></span>
<a href="date_duration.html#id1070952-bb">date_duration</a>(duration_rep);
<a href="date_duration.html#id972807-bb">date_duration</a>(special_values);
<a href="date_duration.html#id966743-bb">date_duration</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a>< duration_rep_traits > &);
<span class="emphasis"><em>// <a href="date_duration.html#id933689-bb">public member functions</a></em></span>
<span class="type">duration_rep</span> <a href="date_duration.html#id892412-bb">get_rep</a>() <span class="bold"><strong>const</strong></span>;
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id861103-bb">is_special</a>() <span class="bold"><strong>const</strong></span>;
<span class="type">duration_rep_type</span> <a href="date_duration.html#id1079817-bb">days</a>() <span class="bold"><strong>const</strong></span>;
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id1110363-bb"><span class="bold"><strong>operator</strong></span>==</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &) <span class="bold"><strong>const</strong></span>;
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id865224-bb"><span class="bold"><strong>operator</strong></span><</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &) <span class="bold"><strong>const</strong></span>;
<span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id798510-bb"><span class="bold"><strong>operator</strong></span>-=</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &) ;
<span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id828778-bb"><span class="bold"><strong>operator</strong></span>+=</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &) ;
<span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id835384-bb"><span class="bold"><strong>operator</strong></span>-</a>() <span class="bold"><strong>const</strong></span>;
<span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>< duration_rep_traits ></span> <a href="date_duration.html#id1109017-bb"><span class="bold"><strong>operator</strong></span>/=</a>(<span class="bold"><strong>int</strong></span>) ;
<span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>< duration_rep_traits ></span> <a href="date_duration.html#id904549-bb"><span class="bold"><strong>operator</strong></span>/</a>(<span class="bold"><strong>int</strong></span>) ;
<span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id967429-bb">is_negative</a>() <span class="bold"><strong>const</strong></span>;
<span class="emphasis"><em>// <a href="date_duration.html#id1074914-bb">public static functions</a></em></span>
<span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id1031300-bb">unit</a>() ;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1042675"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1042679"></a><h3>
<a name="date_durationconstruct-copy-destruct"></a><code class="computeroutput">date_duration</code> construct/copy/destruct</h3>
<div class="orderedlist"><ol type="1">
<li><pre class="literallayout"><a name="id1070952-bb"></a>date_duration(duration_rep day_count);</pre></li>
<li>
<pre class="literallayout"><a name="id972807-bb"></a>date_duration(special_values sv);</pre>
<p>construct from special_values - only works when instantiated with duration_traits_adapted </p>
</li>
<li><pre class="literallayout"><a name="id966743-bb"></a>date_duration(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a>< duration_rep_traits > & other);</pre></li>
</ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1042758"></a><h3>
<a name="id933689-bb"></a><code class="computeroutput">date_duration</code> public member functions</h3>
<div class="orderedlist"><ol type="1">
<li><pre class="literallayout"><span class="type">duration_rep</span> <a name="id892412-bb"></a>get_rep() <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id861103-bb"></a>is_special() <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">duration_rep_type</span> <a name="id1079817-bb"></a>days() <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id1110363-bb"></a><span class="bold"><strong>operator</strong></span>==(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> & rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id865224-bb"></a><span class="bold"><strong>operator</strong></span><(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> & rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id798510-bb"></a><span class="bold"><strong>operator</strong></span>-=(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> & rhs) ;</pre></li>
<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id828778-bb"></a><span class="bold"><strong>operator</strong></span>+=(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> & rhs) ;</pre></li>
<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id835384-bb"></a><span class="bold"><strong>operator</strong></span>-() <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>< duration_rep_traits ></span> <a name="id1109017-bb"></a><span class="bold"><strong>operator</strong></span>/=(<span class="bold"><strong>int</strong></span> divisor) ;</pre></li>
<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>< duration_rep_traits ></span> <a name="id904549-bb"></a><span class="bold"><strong>operator</strong></span>/(<span class="bold"><strong>int</strong></span> divisor) ;</pre></li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id967429-bb"></a>is_negative() <span class="bold"><strong>const</strong></span>;</pre></li>
</ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1043132"></a><h3>
<a name="id1074914-bb"></a><code class="computeroutput">date_duration</code> public static functions</h3>
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id1031300-bb"></a>unit() ;</pre></li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="day_clock.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id729918"><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="duration_traits_long.html"><img src="images/next.png" alt="Next"></a>
</div>
</body>
</html>
|