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 <meta name=
"generator" content=
"Doxygen 1.8.6"/>
7 <title>Boost.Locale: Date, Time, Timezone and Calendar manipulations
</title>
8 <link href=
"tabs.css" rel=
"stylesheet" type=
"text/css"/>
9 <script type=
"text/javascript" src=
"jquery.js"></script>
10 <script type=
"text/javascript" src=
"dynsections.js"></script>
11 <link href=
"navtree.css" rel=
"stylesheet" type=
"text/css"/>
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);
16 $(window).load(resizeHeight);
18 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css" />
21 <div id=
"top"><!-- do not remove this div, it is closed by doxygen! -->
23 <table cellspacing=
"0" cellpadding=
"0">
25 <tr style=
"height: 56px;">
26 <td id=
"projectlogo"><img alt=
"Logo" src=
"boost-small.png"/></td>
27 <td style=
"padding-left: 0.5em;">
28 <div id=
"projectname">Boost.Locale
35 <!-- end header part -->
36 <!-- Generated by Doxygen 1.8.6 -->
37 <div id=
"navrow1" class=
"tabs">
39 <li><a href=
"index.html"><span>Main
 Page
</span></a></li>
40 <li><a href=
"pages.html"><span>Related
 Pages
</span></a></li>
41 <li><a href=
"modules.html"><span>Modules
</span></a></li>
42 <li><a href=
"namespaces.html"><span>Namespaces
</span></a></li>
43 <li><a href=
"annotated.html"><span>Classes
</span></a></li>
44 <li><a href=
"files.html"><span>Files
</span></a></li>
45 <li><a href=
"examples.html"><span>Examples
</span></a></li>
49 <div id=
"side-nav" class=
"ui-resizable side-nav-resizable">
51 <div id=
"nav-tree-contents">
52 <div id=
"nav-sync" class=
"sync"></div>
55 <div id=
"splitbar" style=
"-moz-user-select:none;"
56 class=
"ui-resizable-handle">
59 <script type=
"text/javascript">
60 $(document).ready(function(){initNavTree('group__date__time.html','');});
62 <div id=
"doc-content">
65 <a href=
"#namespaces">Namespaces
</a> |
66 <a href=
"#nested-classes">Classes
</a> |
67 <a href=
"#func-members">Functions
</a> </div>
68 <div class=
"headertitle">
69 <div class=
"title">Date, Time, Timezone and Calendar manipulations
</div> </div>
71 <div class=
"contents">
72 <table class=
"memberdecls">
73 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"namespaces"></a>
74 Namespaces
</h2></td></tr>
75 <tr class=
"memitem:namespaceboost_1_1locale_1_1period"><td class=
"memItemLeft" align=
"right" valign=
"top"> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"namespaceboost_1_1locale_1_1period.html">boost::locale::period
</a></td></tr>
76 <tr class=
"memdesc:namespaceboost_1_1locale_1_1period"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Namespace that contains various types for manipulation with dates.
<br/></td></tr>
77 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
78 <tr class=
"memitem:namespaceboost_1_1locale_1_1time__zone"><td class=
"memItemLeft" align=
"right" valign=
"top"> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"namespaceboost_1_1locale_1_1time__zone.html">boost::locale::time_zone
</a></td></tr>
79 <tr class=
"memdesc:namespaceboost_1_1locale_1_1time__zone"><td class=
"mdescLeft"> </td><td class=
"mdescRight">namespace that holds functions for operating with global time zone
<br/></td></tr>
80 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
81 </table><table class=
"memberdecls">
82 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"nested-classes"></a>
83 Classes
</h2></td></tr>
84 <tr class=
"memitem:"><td class=
"memItemLeft" align=
"right" valign=
"top">class
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classboost_1_1locale_1_1date__time__error.html">boost::locale::date_time_error
</a></td></tr>
85 <tr class=
"memdesc:"><td class=
"mdescLeft"> </td><td class=
"mdescRight">This error is thrown in case of invalid state that occurred.
<a href=
"classboost_1_1locale_1_1date__time__error.html#details">More...
</a><br/></td></tr>
86 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
87 <tr class=
"memitem:"><td class=
"memItemLeft" align=
"right" valign=
"top">struct
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1date__time__period.html">boost::locale::date_time_period
</a></td></tr>
88 <tr class=
"memdesc:"><td class=
"mdescLeft"> </td><td class=
"mdescRight">This class represents a pair of period_type and the integer values that describes its amount. For example
3 days or
4 years.
<a href=
"structboost_1_1locale_1_1date__time__period.html#details">More...
</a><br/></td></tr>
89 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
90 <tr class=
"memitem:"><td class=
"memItemLeft" align=
"right" valign=
"top">class
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classboost_1_1locale_1_1date__time__period__set.html">boost::locale::date_time_period_set
</a></td></tr>
91 <tr class=
"memdesc:"><td class=
"mdescLeft"> </td><td class=
"mdescRight">this class that represents a set of periods,
<a href=
"classboost_1_1locale_1_1date__time__period__set.html#details">More...
</a><br/></td></tr>
92 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
93 <tr class=
"memitem:"><td class=
"memItemLeft" align=
"right" valign=
"top">class
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classboost_1_1locale_1_1calendar.html">boost::locale::calendar
</a></td></tr>
94 <tr class=
"memdesc:"><td class=
"mdescLeft"> </td><td class=
"mdescRight">this class provides an access to general calendar information.
<a href=
"classboost_1_1locale_1_1calendar.html#details">More...
</a><br/></td></tr>
95 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
96 <tr class=
"memitem:"><td class=
"memItemLeft" align=
"right" valign=
"top">class
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classboost_1_1locale_1_1date__time.html">boost::locale::date_time
</a></td></tr>
97 <tr class=
"memdesc:"><td class=
"mdescLeft"> </td><td class=
"mdescRight">this class represents a date time and allows to perform various operation according to the locale settings.
<a href=
"classboost_1_1locale_1_1date__time.html#details">More...
</a><br/></td></tr>
98 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
99 <tr class=
"memitem:"><td class=
"memItemLeft" align=
"right" valign=
"top">class
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"classboost_1_1locale_1_1date__time__duration.html">boost::locale::date_time_duration
</a></td></tr>
100 <tr class=
"memdesc:"><td class=
"mdescLeft"> </td><td class=
"mdescRight">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.
<a href=
"classboost_1_1locale_1_1date__time__duration.html#details">More...
</a><br/></td></tr>
101 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
102 </table><table class=
"memberdecls">
103 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"func-members"></a>
104 Functions
</h2></td></tr>
105 <tr class=
"memitem:gaa7e728633f76cae8fa19e76cfb5e113b"><td class=
"memItemLeft" align=
"right" valign=
"top">date_time_period_set
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"group__date__time.html#gaa7e728633f76cae8fa19e76cfb5e113b">boost::locale::operator+
</a> (date_time_period_set const
&a, date_time_period_set const
&b)
</td></tr>
106 <tr class=
"separator:gaa7e728633f76cae8fa19e76cfb5e113b"><td class=
"memSeparator" colspan=
"2"> </td></tr>
107 <tr class=
"memitem:ga023333646e070abf361be3890c12560b"><td class=
"memItemLeft" align=
"right" valign=
"top">date_time_period_set
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"group__date__time.html#ga023333646e070abf361be3890c12560b">boost::locale::operator-
</a> (date_time_period_set const
&a, date_time_period_set const
&b)
</td></tr>
108 <tr class=
"separator:ga023333646e070abf361be3890c12560b"><td class=
"memSeparator" colspan=
"2"> </td></tr>
109 <tr class=
"memitem:ga759109f4470f00ec3d91f5797db82b9b"><td class=
"memTemplParams" colspan=
"2">template
<typename CharType
> </td></tr>
110 <tr class=
"memitem:ga759109f4470f00ec3d91f5797db82b9b"><td class=
"memTemplItemLeft" align=
"right" valign=
"top">std::basic_ostream
< CharType
> & </td><td class=
"memTemplItemRight" valign=
"bottom"><a class=
"el" href=
"group__date__time.html#ga759109f4470f00ec3d91f5797db82b9b">boost::locale::operator
<<</a> (std::basic_ostream
< CharType
> &out, date_time const
&t)
</td></tr>
111 <tr class=
"separator:ga759109f4470f00ec3d91f5797db82b9b"><td class=
"memSeparator" colspan=
"2"> </td></tr>
112 <tr class=
"memitem:gaf6e30351fc67e887e37853723c228484"><td class=
"memTemplParams" colspan=
"2">template
<typename CharType
> </td></tr>
113 <tr class=
"memitem:gaf6e30351fc67e887e37853723c228484"><td class=
"memTemplItemLeft" align=
"right" valign=
"top">std::basic_istream
< CharType
> & </td><td class=
"memTemplItemRight" valign=
"bottom"><a class=
"el" href=
"group__date__time.html#gaf6e30351fc67e887e37853723c228484">boost::locale::operator
>></a> (std::basic_istream
< CharType
> &in, date_time
&t)
</td></tr>
114 <tr class=
"separator:gaf6e30351fc67e887e37853723c228484"><td class=
"memSeparator" colspan=
"2"> </td></tr>
115 <tr class=
"memitem:ga13c05afeb4ea7904b944b42f6c685022"><td class=
"memItemLeft" align=
"right" valign=
"top">date_time_duration
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"group__date__time.html#ga13c05afeb4ea7904b944b42f6c685022">boost::locale::operator-
</a> (date_time const
&later, date_time const
&earlier)
</td></tr>
116 <tr class=
"separator:ga13c05afeb4ea7904b944b42f6c685022"><td class=
"memSeparator" colspan=
"2"> </td></tr>
118 <a name=
"details" id=
"details"></a><h2 class=
"groupheader">Detailed Description
</h2>
119 <p>This module provides various calendar, timezone and date time services
</p>
120 <h2 class=
"groupheader">Function Documentation
</h2>
121 <a class=
"anchor" id=
"gaa7e728633f76cae8fa19e76cfb5e113b"></a>
122 <div class=
"memitem">
123 <div class=
"memproto">
124 <table class=
"mlabels">
126 <td class=
"mlabels-left">
127 <table class=
"memname">
129 <td class=
"memname">date_time_period_set boost::locale::operator+
</td>
131 <td class=
"paramtype">date_time_period_set const
& </td>
132 <td class=
"paramname"><em>a
</em>,
</td>
135 <td class=
"paramkey"></td>
137 <td class=
"paramtype">date_time_period_set const
& </td>
138 <td class=
"paramname"><em>b
</em> </td>
147 <td class=
"mlabels-right">
148 <span class=
"mlabels"><span class=
"mlabel">inline
</span></span> </td>
151 </div><div class=
"memdoc">
152 <p>Append two periods sets. Note this operator is not commutative
</p>
156 <a class=
"anchor" id=
"ga023333646e070abf361be3890c12560b"></a>
157 <div class=
"memitem">
158 <div class=
"memproto">
159 <table class=
"mlabels">
161 <td class=
"mlabels-left">
162 <table class=
"memname">
164 <td class=
"memname">date_time_period_set boost::locale::operator-
</td>
166 <td class=
"paramtype">date_time_period_set const
& </td>
167 <td class=
"paramname"><em>a
</em>,
</td>
170 <td class=
"paramkey"></td>
172 <td class=
"paramtype">date_time_period_set const
& </td>
173 <td class=
"paramname"><em>b
</em> </td>
182 <td class=
"mlabels-right">
183 <span class=
"mlabels"><span class=
"mlabel">inline
</span></span> </td>
186 </div><div class=
"memdoc">
187 <p>Append two period sets when all periods of set
<b>change
</b> their sign
</p>
191 <a class=
"anchor" id=
"ga13c05afeb4ea7904b944b42f6c685022"></a>
192 <div class=
"memitem">
193 <div class=
"memproto">
194 <table class=
"mlabels">
196 <td class=
"mlabels-left">
197 <table class=
"memname">
199 <td class=
"memname">date_time_duration boost::locale::operator-
</td>
201 <td class=
"paramtype">date_time const
& </td>
202 <td class=
"paramname"><em>later
</em>,
</td>
205 <td class=
"paramkey"></td>
207 <td class=
"paramtype">date_time const
& </td>
208 <td class=
"paramname"><em>earlier
</em> </td>
217 <td class=
"mlabels-right">
218 <span class=
"mlabels"><span class=
"mlabel">inline
</span></span> </td>
221 </div><div class=
"memdoc">
222 <p>Calculates the difference between two dates, the left operand is a later point on time line. Returns
<a class=
"el" href=
"classboost_1_1locale_1_1date__time__duration.html" title=
"This class represents a period: a pair of two date_time objects. ">date_time_duration
</a> object.
</p>
226 <a class=
"anchor" id=
"ga759109f4470f00ec3d91f5797db82b9b"></a>
227 <div class=
"memitem">
228 <div class=
"memproto">
229 <div class=
"memtemplate">
230 template
<typename CharType
> </div>
231 <table class=
"memname">
233 <td class=
"memname">std::basic_ostream
<CharType
>& boost::locale::operator
<< </td>
235 <td class=
"paramtype">std::basic_ostream
< CharType
> & </td>
236 <td class=
"paramname"><em>out
</em>,
</td>
239 <td class=
"paramkey"></td>
241 <td class=
"paramtype">date_time const
& </td>
242 <td class=
"paramname"><em>t
</em> </td>
250 </div><div class=
"memdoc">
251 <p>Writes
<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> <em>t
</em> to output stream
<em>out
</em>.
</p>
252 <p>This function uses locale, calendar and time zone of the target stream
<em>in
</em>.
</p>
254 <div class=
"fragment"><div class=
"line">date_time now(
<a class=
"code" href=
"group__manipulators.html#gae669b101cbeaed6f6d246ebdcaa8f39c">time
</a>(
0),hebrew_calendar)
</div>
255 <div class=
"line">cout
<< "Year:
" << period::year(now)
<<" Full Date:
"<< now;
</div>
256 </div><!-- fragment --><p>The output may be Year:
5770 Full Date:Jan
1,
2010 </p>
260 <a class=
"anchor" id=
"gaf6e30351fc67e887e37853723c228484"></a>
261 <div class=
"memitem">
262 <div class=
"memproto">
263 <div class=
"memtemplate">
264 template
<typename CharType
> </div>
265 <table class=
"memname">
267 <td class=
"memname">std::basic_istream
<CharType
>& boost::locale::operator
>> </td>
269 <td class=
"paramtype">std::basic_istream
< CharType
> & </td>
270 <td class=
"paramname"><em>in
</em>,
</td>
273 <td class=
"paramkey"></td>
275 <td class=
"paramtype">date_time
& </td>
276 <td class=
"paramname"><em>t
</em> </td>
284 </div><div class=
"memdoc">
285 <p>Reads
<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> <em>t
</em> from output stream
<em>in
</em> </p>
286 <p>This function uses locale, calendar and time zone of the source stream
<em>in
</em>.
</p>
290 </div><!-- contents -->
291 </div><!-- doc-content -->
294 © 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.