Imported Upstream version 1.72.0
[platform/upstream/boost.git] / doc / html / date_time / posix_time.html
index 988a51a..2022a56 100644 (file)
@@ -776,7 +776,7 @@ time_duration neg_td(-1,2,3);
 td.minutes(); // --> 2
 neg_td.minutes(); // --&gt; -2</pre></td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">boost::int64_t seconds()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">boost::int64_t seconds() const</pre></td>
 <td>Get the normalized number of second +/-(0..59) (will give unpredictable results if calling <code class="computeroutput">time_duration</code> is a <code class="computeroutput">special_value</code>).</td>
 </tr>
 <tr><td><pre class="screen">time_duration td(1,2,3); 
@@ -784,7 +784,7 @@ time_duration neg_td(-1,2,3);
 td.seconds(); // --&gt; 3
 neg_td.seconds(); // --&gt; -3</pre></td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_seconds()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_seconds() const</pre></td>
 <td>Get the total number of seconds truncating any fractional seconds (will give unpredictable results if calling <code class="computeroutput">time_duration</code> is a <code class="computeroutput">special_value</code>).</td>
 </tr>
 <tr><td>
@@ -793,7 +793,7 @@ td.total_seconds();
 // --&gt; (1*3600) + (2*60) + 3 == 3723</pre>
            </td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_milliseconds()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_milliseconds() const</pre></td>
 <td>Get the total number of milliseconds truncating any remaining digits (will give unpredictable results if calling <code class="computeroutput">time_duration</code> is a <code class="computeroutput">special_value</code>).</td>
 </tr>
 <tr><td>
@@ -804,7 +804,7 @@ td.total_milliseconds();
 // (3723 * 1000) + 123 == 3723123</pre>
            </td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_microseconds()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_microseconds() const</pre></td>
 <td>Get the total number of microseconds truncating any remaining digits (will give unpredictable results if calling <code class="computeroutput">time_duration</code> is a <code class="computeroutput">special_value</code>).</td>
 </tr>
 <tr><td>
@@ -815,7 +815,7 @@ td.total_microseconds();
 // (3723 * 1000000) + 123456 == 3723123456</pre>
            </td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_nanoseconds()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">boost::int64_t total_nanoseconds() const</pre></td>
 <td>Get the total number of nanoseconds truncating any remaining digits (will give unpredictable results if calling <code class="computeroutput">time_duration</code> is a <code class="computeroutput">special_value</code>).</td>
 </tr>
 <tr><td>
@@ -827,80 +827,138 @@ td.total_nanoseconds();
 //                              == 3723123456789</pre>
            </td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">boost::int64_t fractional_seconds()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">boost::int64_t fractional_seconds() const</pre></td>
 <td>Get the number of fractional seconds (will give unpredictable results if calling <code class="computeroutput">time_duration</code> is a <code class="computeroutput">special_value</code>).</td>
 </tr>
 <tr><td><pre class="screen">time_duration td(1,2,3, 1000);
 td.fractional_seconds(); // --&gt; 1000</pre></td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">bool is_negative()</pre></td>
-<td>True if duration is negative.</td>
+<td rowspan="2" valign="top"><pre class="screen">bool is_negative() const</pre></td>
+<td>True if and only if duration is negative.</td>
 </tr>
 <tr><td><pre class="screen">time_duration td(-1,0,0); 
 td.is_negative(); // --&gt; true</pre></td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">time_duration invert_sign()</pre></td>
-<td>Generate a new duration with the sign inverted/</td>
+<td rowspan="2" valign="top"><pre class="screen">bool is_zero() const</pre></td>
+<td>True if and only if duration is zero.</td>
 </tr>
-<tr><td><pre class="screen">time_duration td(-1,0,0); 
+<tr><td><pre class="screen">time_duration td(0,0,0);
+td.is_zero(); // --&gt; true</pre></td></tr>
+<tr>
+<td rowspan="2" valign="top"><pre class="screen">bool is_positive() const</pre></td>
+<td>True if and only if duration is positive.</td>
+</tr>
+<tr><td><pre class="screen">time_duration td(1,0,0);
+td.is_positive(); // --&gt; true</pre></td></tr>
+<tr>
+<td rowspan="2" valign="top"><pre class="screen">time_duration invert_sign() const</pre></td>
+<td>Generate a new duration with the sign inverted.</td>
+</tr>
+<tr><td><pre class="screen">time_duration td(-1,0,0);
 td.invert_sign(); // --&gt; 01:00:00</pre></td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">date_time::time_resolutions resolution()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">time_duration abs() const</pre></td>
+<td>Generate a new duration with the absolute value of the time duration.</td>
+</tr>
+<tr>
+<td><pre class="screen">time_duration td(-1,0,0);
+td.abs(); // --&gt; 01:00:00</pre></td>
+<td><pre class="screen">time_duration td(+1,0,0);
+td.abs(); // --&gt; 01:00:00</pre></td>
+</tr>
+<tr>
+<td rowspan="2" valign="top"><pre class="screen">date_time::time_resolutions time_duration::resolution()</pre></td>
 <td>Describes the resolution capability of the time_duration class. time_resolutions is an enum of resolution possibilities ranging from seconds to nanoseconds.</td>
+<td class="auto-generated">&#160;</td>
+</tr>
+<tr>
+<td><pre class="screen">time_duration::resolution() --&gt; nano</pre></td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">time_duration::resolution() --&gt; nano</pre></td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">time_duration::num_fractional_digits()</pre></td>
-<td>Returns an unsigned short holding the number of fractional digits the time resolution has.</td>
+<td rowspan="2" valign="top"><pre class="screen">unsigned short time_duration::num_fractional_digits()</pre></td>
+<td>Returns the number of fractional digits the time resolution has.</td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">unsigned short secs;
+<tr>
+<td><pre class="screen">unsigned short secs;
 secs = time_duration::num_fractional_digits();
-// 9 for nano, 6 for micro, etc.</pre></td></tr>
+// 9 for nano, 6 for micro, etc.</pre></td>
+<td class="auto-generated">&#160;</td>
+</tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">time_duration::ticks_per_second()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">boost::int64_t time_duration::ticks_per_second()</pre></td>
 <td>Return the number of ticks in a second.  For example, if the duration supports nanoseconds then the returned result will be 1,000,000,000 (1e+9).</td>
+<td class="auto-generated">&#160;</td>
+</tr>
+<tr>
+<td><pre class="screen">std::cout &lt;&lt; time_duration::ticks_per_second();</pre></td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">std::cout &lt;&lt; time_duration::ticks_per_second();</pre></td></tr>
 <tr>
 <td rowspan="2" valign="top"><pre class="screen">boost::int64_t ticks()</pre></td>
 <td>Return the raw count of the duration type (will give unpredictable results if calling <code class="computeroutput">time_duration</code> is a <code class="computeroutput">special_value</code>).</td>
+<td class="auto-generated">&#160;</td>
+</tr>
+<tr>
+<td><pre class="screen">time_duration td(0,0,0, 1000);
+td.ticks() // --&gt; 1000</pre></td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">time_duration td(0,0,0, 1000);
-td.ticks() // --&gt; 1000</pre></td></tr>
 <tr>
-<td rowspan="2" valign="top"><pre class="screen">time_duration unit()</pre></td>
+<td rowspan="2" valign="top"><pre class="screen">time_duration time_duration::unit()</pre></td>
 <td>Return smallest possible unit of duration type (1 nanosecond).</td>
+<td class="auto-generated">&#160;</td>
+</tr>
+<tr>
+<td><pre class="screen">time_duration::unit() --&gt; time_duration(0,0,0,1)</pre></td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">time_duration::unit() --&gt; time_duration(0,0,0,1)</pre></td></tr>
 <tr>
 <td rowspan="2" valign="top"><pre class="screen">bool is_neg_infinity() const</pre></td>
 <td>Returns true if time_duration is negative infinity</td>
+<td class="auto-generated">&#160;</td>
+</tr>
+<tr>
+<td><pre class="screen">time_duration td(neg_infin);
+td.is_neg_infinity(); // --&gt; true</pre></td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">time_duration td(neg_infin);
-td.is_neg_infinity(); // --&gt; true</pre></td></tr>
 <tr>
 <td rowspan="2" valign="top"><pre class="screen">bool is_pos_infinity() const</pre></td>
 <td>Returns true if time_duration is positive infinity</td>
+<td class="auto-generated">&#160;</td>
+</tr>
+<tr>
+<td><pre class="screen">time_duration td(pos_infin); 
+td.is_pos_infinity(); // --&gt; true</pre></td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">time_duration td(pos_infin); 
-td.is_pos_infinity(); // --&gt; true</pre></td></tr>
 <tr>
 <td rowspan="2" valign="top"><pre class="screen">bool is_not_a_date_time() const</pre></td>
 <td>Returns true if value is not a time</td>
+<td class="auto-generated">&#160;</td>
+</tr>
+<tr>
+<td><pre class="screen">time_duration td(not_a_date_time);
+td.is_not_a_date_time(); // --&gt; true</pre></td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">time_duration td(not_a_date_time);
-td.is_not_a_date_time(); // --&gt; true</pre></td></tr>
 <tr>
 <td rowspan="2" valign="top"><pre class="screen">bool is_special() const</pre></td>
 <td>Returns true if time_duration is any <code class="computeroutput">special_value</code>
 </td>
+<td class="auto-generated">&#160;</td>
 </tr>
-<tr><td><pre class="screen">time_duration td(pos_infin); 
+<tr>
+<td><pre class="screen">time_duration td(pos_infin); 
 time_duration td2(not_a_date_time); 
 time_duration td3(2,5,10);
 td.is_special(); // --&gt; true
 td2.is_special(); // --&gt; true
-td3.is_special(); // --&gt; false</pre></td></tr>
+td3.is_special(); // --&gt; false</pre></td>
+<td class="auto-generated">&#160;</td>
+</tr>
 </tbody>
 </table></div>
 <p>