1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>Boost.Locale: boost::locale::date_time_duration Class Reference</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <link href="navtree.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="resize.js"></script>
13 <script type="text/javascript" src="navtree.js"></script>
14 <script type="text/javascript">
15 $(document).ready(initResizable);
21 <div id="top"><!-- do not remove this div! -->
25 <table cellspacing="0" cellpadding="0">
27 <tr style="height: 56px;">
29 <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
32 <td style="padding-left: 0.5em;">
33 <div id="projectname">Boost.Locale
46 <!-- Generated by Doxygen 1.7.6.1 -->
47 <div id="navrow1" class="tabs">
49 <li><a href="index.html"><span>Main Page</span></a></li>
50 <li><a href="modules.html"><span>Modules</span></a></li>
51 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
52 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
53 <li><a href="files.html"><span>Files</span></a></li>
54 <li><a href="examples.html"><span>Examples</span></a></li>
57 <div id="navrow2" class="tabs2">
59 <li><a href="annotated.html"><span>Class List</span></a></li>
60 <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
61 <li><a href="functions.html"><span>Class Members</span></a></li>
65 <div id="side-nav" class="ui-resizable side-nav-resizable">
67 <div id="nav-tree-contents">
70 <div id="splitbar" style="-moz-user-select:none;"
71 class="ui-resizable-handle">
74 <script type="text/javascript">
75 initNavTree('classboost_1_1locale_1_1date__time__duration.html','');
77 <div id="doc-content">
80 <a href="#pub-methods">Public Member Functions</a> </div>
81 <div class="headertitle">
82 <div class="title">boost::locale::date_time_duration Class Reference<div class="ingroups"><a class="el" href="group__date__time.html">Date, Time, Timezone and Calendar manipulations</a></div></div> </div>
84 <div class="contents">
85 <!-- doxytag: class="boost::locale::date_time_duration" -->
86 <p>This class represents a period: a pair of two <a class="el" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">date_time</a> objects.
87 <a href="classboost_1_1locale_1_1date__time__duration.html#details">More...</a></p>
89 <p><code>#include <<a class="el" href="date__time_8hpp_source.html">boost/locale/date_time.hpp</a>></code></p>
91 <p><a href="classboost_1_1locale_1_1date__time__duration-members.html">List of all members.</a></p>
92 <table class="memberdecls">
93 <tr><td colspan="2"><h2><a name="pub-methods"></a>
94 Public Member Functions</h2></td></tr>
95 <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html#ac4b0d49c998032003553e8faf0e5f2cb">date_time_duration</a> (<a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const &first, <a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const &second)</td></tr>
96 <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html#a5d1b702c281d205e1dafbb15ce85b447">get</a> (<a class="el" href="classboost_1_1locale_1_1period_1_1period__type.html">period::period_type</a> f) const </td></tr>
97 <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html#ac1a04091cc80b98f6faf7e5e73ce5f35">operator/</a> (<a class="el" href="classboost_1_1locale_1_1period_1_1period__type.html">period::period_type</a> f) const </td></tr>
98 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const & </td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html#afc2f075595d1774c866250d192b9db31">start</a> () const </td></tr>
99 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const & </td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html#a100bac2003f4e07ea498e10d0dd1f6b1">end</a> () const </td></tr>
101 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
102 <div class="textblock"><p>This class represents a period: a pair of two <a class="el" href="classboost_1_1locale_1_1date__time.html" title="this class represents a date time and allows to perform various operation according to the locale set...">date_time</a> objects. </p>
103 <p>It is generally used as syntactic sugar to calculate difference between two dates.</p>
104 <p>Note: it stores references to the original objects, so it is not recommended to be used outside of the equation you calculate the difference in. </p>
105 </div><hr/><h2>Constructor & Destructor Documentation</h2>
106 <a class="anchor" id="ac4b0d49c998032003553e8faf0e5f2cb"></a><!-- doxytag: member="boost::locale::date_time_duration::date_time_duration" ref="ac4b0d49c998032003553e8faf0e5f2cb" args="(date_time const &first, date_time const &second)" -->
107 <div class="memitem">
108 <div class="memproto">
109 <table class="memname">
111 <td class="memname"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html#ac4b0d49c998032003553e8faf0e5f2cb">boost::locale::date_time_duration::date_time_duration</a> </td>
113 <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const & </td>
114 <td class="paramname"><em>first</em>, </td>
117 <td class="paramkey"></td>
119 <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const & </td>
120 <td class="paramname"><em>second</em> </td>
125 <td></td><td><code> [inline]</code></td>
130 <p>Create an object were <em>first</em> represents earlier point on time line and <em>second</em> is later point. </p>
134 <hr/><h2>Member Function Documentation</h2>
135 <a class="anchor" id="a100bac2003f4e07ea498e10d0dd1f6b1"></a><!-- doxytag: member="boost::locale::date_time_duration::end" ref="a100bac2003f4e07ea498e10d0dd1f6b1" args="() const " -->
136 <div class="memitem">
137 <div class="memproto">
138 <table class="memname">
140 <td class="memname"><a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const& <a class="el" href="classboost_1_1locale_1_1date__time__duration.html#a100bac2003f4e07ea498e10d0dd1f6b1">boost::locale::date_time_duration::end</a> </td>
142 <td class="paramname"></td><td>)</td>
143 <td> const<code> [inline]</code></td>
148 <p>Get ending point </p>
152 <a class="anchor" id="a5d1b702c281d205e1dafbb15ce85b447"></a><!-- doxytag: member="boost::locale::date_time_duration::get" ref="a5d1b702c281d205e1dafbb15ce85b447" args="(period::period_type f) const " -->
153 <div class="memitem">
154 <div class="memproto">
155 <table class="memname">
157 <td class="memname">int <a class="el" href="classboost_1_1locale_1_1date__time__duration.html#a5d1b702c281d205e1dafbb15ce85b447">boost::locale::date_time_duration::get</a> </td>
159 <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1period_1_1period__type.html">period::period_type</a> </td>
160 <td class="paramname"><em>f</em></td><td>)</td>
161 <td> const<code> [inline]</code></td>
166 <p>find a difference in terms of period_type <em>f</em> </p>
170 <a class="anchor" id="ac1a04091cc80b98f6faf7e5e73ce5f35"></a><!-- doxytag: member="boost::locale::date_time_duration::operator/" ref="ac1a04091cc80b98f6faf7e5e73ce5f35" args="(period::period_type f) const " -->
171 <div class="memitem">
172 <div class="memproto">
173 <table class="memname">
175 <td class="memname">int boost::locale::date_time_duration::operator/ </td>
177 <td class="paramtype"><a class="el" href="classboost_1_1locale_1_1period_1_1period__type.html">period::period_type</a> </td>
178 <td class="paramname"><em>f</em></td><td>)</td>
179 <td> const<code> [inline]</code></td>
184 <p>Syntactic sugar for get(f) </p>
188 <a class="anchor" id="afc2f075595d1774c866250d192b9db31"></a><!-- doxytag: member="boost::locale::date_time_duration::start" ref="afc2f075595d1774c866250d192b9db31" args="() const " -->
189 <div class="memitem">
190 <div class="memproto">
191 <table class="memname">
193 <td class="memname"><a class="el" href="classboost_1_1locale_1_1date__time.html">date_time</a> const& <a class="el" href="classboost_1_1locale_1_1date__time__duration.html#afc2f075595d1774c866250d192b9db31">boost::locale::date_time_duration::start</a> </td>
195 <td class="paramname"></td><td>)</td>
196 <td> const<code> [inline]</code></td>
201 <p>Get starting point </p>
205 <hr/>The documentation for this class was generated from the following file:<ul>
206 <li>boost/locale/<a class="el" href="date__time_8hpp_source.html">date_time.hpp</a></li>
208 </div><!-- contents -->
210 <div id="nav-path" class="navpath">
212 <li class="navelem"><b>boost</b> </li>
213 <li class="navelem"><a class="el" href="namespaceboost_1_1locale.html">locale</a> </li>
214 <li class="navelem"><a class="el" href="classboost_1_1locale_1_1date__time__duration.html">date_time_duration</a> </li>
217 © Copyright 2009-2012 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0.