| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
|---|
| 4 | <title>Class template dst_calculator</title> |
|---|
| 5 | <link rel="stylesheet" href="boostbook.css" type="text/css"> |
|---|
| 6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
|---|
| 7 | <link rel="start" href="index.html" title="The Boost C++ Libraries"> |
|---|
| 8 | <link rel="up" href="date_time/doxy.html#id2510544" title="Header <boost/date_time/dst_rules.hpp>"> |
|---|
| 9 | <link rel="prev" href="all_date_names_put.html" title="Class template all_date_names_put"> |
|---|
| 10 | <link rel="next" href="dst_calc_engine.html" title="Class template dst_calc_engine"> |
|---|
| 11 | </head> |
|---|
| 12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
|---|
| 13 | <table cellpadding="2" width="100%"> |
|---|
| 14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td> |
|---|
| 15 | <td align="center"><a href="../../index.htm">Home</a></td> |
|---|
| 16 | <td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> |
|---|
| 17 | <td align="center"><a href="../../people/people.htm">People</a></td> |
|---|
| 18 | <td align="center"><a href="../../more/faq.htm">FAQ</a></td> |
|---|
| 19 | <td align="center"><a href="../../more/index.htm">More</a></td> |
|---|
| 20 | </table> |
|---|
| 21 | <hr> |
|---|
| 22 | <div class="spirit-nav"> |
|---|
| 23 | <a accesskey="p" href="all_date_names_put.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2510544"><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="dst_calc_engine.html"><img src="images/next.png" alt="Next"></a> |
|---|
| 24 | </div> |
|---|
| 25 | <div class="refentry" lang="en"> |
|---|
| 26 | <a name="dst_calculator"></a><div class="titlepage"></div> |
|---|
| 27 | <div class="refnamediv"> |
|---|
| 28 | <h2><span class="refentrytitle">Class template dst_calculator</span></h2> |
|---|
| 29 | <p>boost::date_time::dst_calculator — Dynamic class used to caluclate dst transition information. </p> |
|---|
| 30 | </div> |
|---|
| 31 | <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> |
|---|
| 32 | <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> date_type_, <span class="bold"><strong>typename</strong></span> time_duration_type_> |
|---|
| 33 | <span class="bold"><strong>class</strong></span> dst_calculator { |
|---|
| 34 | <span class="bold"><strong>public</strong></span>: |
|---|
| 35 | <span class="emphasis"><em>// types</em></span> |
|---|
| 36 | <span class="bold"><strong>typedef</strong></span> time_duration_type_ time_duration_type; |
|---|
| 37 | <span class="bold"><strong>typedef</strong></span> date_type_ date_type; |
|---|
| 38 | |
|---|
| 39 | <span class="emphasis"><em>// <a href="dst_calculator.html#id2434887-bb">public static functions</a></em></span> |
|---|
| 40 | <span class="type">time_is_dst_result</span> |
|---|
| 41 | <a href="dst_calculator.html#id2434891-bb">process_local_dst_start_day</a>(<span class="bold"><strong>const</strong></span> time_duration_type &, <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span>, <span class="bold"><strong>long</strong></span>) ; |
|---|
| 42 | <span class="type">time_is_dst_result</span> |
|---|
| 43 | <a href="dst_calculator.html#id2416537-bb">process_local_dst_end_day</a>(<span class="bold"><strong>const</strong></span> time_duration_type &, <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span>, <span class="bold"><strong>long</strong></span>) ; |
|---|
| 44 | <span class="type">time_is_dst_result</span> |
|---|
| 45 | <a href="dst_calculator.html#id2505648-bb">local_is_dst</a>(<span class="bold"><strong>const</strong></span> date_type &, <span class="bold"><strong>const</strong></span> time_duration_type &, |
|---|
| 46 | <span class="bold"><strong>const</strong></span> date_type &, <span class="bold"><strong>const</strong></span> time_duration_type &, |
|---|
| 47 | <span class="bold"><strong>const</strong></span> date_type &, <span class="bold"><strong>const</strong></span> time_duration_type &, |
|---|
| 48 | <span class="bold"><strong>const</strong></span> time_duration_type &) ; |
|---|
| 49 | <span class="type">time_is_dst_result</span> |
|---|
| 50 | <a href="dst_calculator.html#id2397912-bb">local_is_dst</a>(<span class="bold"><strong>const</strong></span> date_type &, <span class="bold"><strong>const</strong></span> time_duration_type &, |
|---|
| 51 | <span class="bold"><strong>const</strong></span> date_type &, <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span>, <span class="bold"><strong>const</strong></span> date_type &, |
|---|
| 52 | <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span>, <span class="bold"><strong>long</strong></span>) ; |
|---|
| 53 | };</pre></div> |
|---|
| 54 | <div class="refsect1" lang="en"> |
|---|
| 55 | <a name="id2631826"></a><h2>Description</h2> |
|---|
| 56 | <div class="refsect2" lang="en"> |
|---|
| 57 | <a name="id2631830"></a><h3> |
|---|
| 58 | <a name="id2434887-bb"></a><code class="computeroutput">dst_calculator</code> public static functions</h3> |
|---|
| 59 | <div class="orderedlist"><ol type="1"> |
|---|
| 60 | <li> |
|---|
| 61 | <pre class="literallayout"><span class="type">time_is_dst_result</span> |
|---|
| 62 | <a name="id2434891-bb"></a>process_local_dst_start_day(<span class="bold"><strong>const</strong></span> time_duration_type & time_of_day, |
|---|
| 63 | <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span> dst_start_offset_minutes, |
|---|
| 64 | <span class="bold"><strong>long</strong></span> dst_length_minutes) ;</pre> |
|---|
| 65 | <p>On this dst transition, the time label between the transition boundary and the boudary + the offset are invalid times. If before the boundary then still not in dst. |
|---|
| 66 | |
|---|
| 67 | </p> |
|---|
| 68 | <div class="variablelist"> |
|---|
| 69 | <p class="title"><b>Parameters</b></p> |
|---|
| 70 | <dl> |
|---|
| 71 | <dt><span class="term">dst_length_minutes</span></dt> |
|---|
| 72 | <dd><p>Number of minutes to adjust clock forward </p></dd> |
|---|
| 73 | <dt><span class="term">dst_start_offset_minutes</span></dt> |
|---|
| 74 | <dd><p>Local day offset for start of dst </p></dd> |
|---|
| 75 | <dt><span class="term">time_of_day</span></dt> |
|---|
| 76 | <dd><p>Time offset in the day for the local time </p></dd> |
|---|
| 77 | </dl> |
|---|
| 78 | </div> |
|---|
| 79 | </li> |
|---|
| 80 | <li> |
|---|
| 81 | <pre class="literallayout"><span class="type">time_is_dst_result</span> |
|---|
| 82 | <a name="id2416537-bb"></a>process_local_dst_end_day(<span class="bold"><strong>const</strong></span> time_duration_type & time_of_day, |
|---|
| 83 | <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span> dst_end_offset_minutes, |
|---|
| 84 | <span class="bold"><strong>long</strong></span> dst_length_minutes) ;</pre> |
|---|
| 85 | <p>This is the calculation for the DST end day. On that day times prior to the conversion time - dst_length (1 am in US) are still in dst. Times between the above and the switch time are ambiguous. Times after the start_offset are not in dst. |
|---|
| 86 | |
|---|
| 87 | </p> |
|---|
| 88 | <div class="variablelist"> |
|---|
| 89 | <p class="title"><b>Parameters</b></p> |
|---|
| 90 | <dl> |
|---|
| 91 | <dt><span class="term">dst_end_offset_minutes</span></dt> |
|---|
| 92 | <dd><p>Local time of day for end of dst </p></dd> |
|---|
| 93 | <dt><span class="term">time_of_day</span></dt> |
|---|
| 94 | <dd><p>Time offset in the day for the local time </p></dd> |
|---|
| 95 | </dl> |
|---|
| 96 | </div> |
|---|
| 97 | </li> |
|---|
| 98 | <li> |
|---|
| 99 | <pre class="literallayout"><span class="type">time_is_dst_result</span> |
|---|
| 100 | <a name="id2505648-bb"></a>local_is_dst(<span class="bold"><strong>const</strong></span> date_type & current_day, |
|---|
| 101 | <span class="bold"><strong>const</strong></span> time_duration_type & time_of_day, |
|---|
| 102 | <span class="bold"><strong>const</strong></span> date_type & dst_start_day, |
|---|
| 103 | <span class="bold"><strong>const</strong></span> time_duration_type & dst_start_offset, |
|---|
| 104 | <span class="bold"><strong>const</strong></span> date_type & dst_end_day, |
|---|
| 105 | <span class="bold"><strong>const</strong></span> time_duration_type & dst_end_offset, |
|---|
| 106 | <span class="bold"><strong>const</strong></span> time_duration_type & dst_length_minutes) ;</pre> |
|---|
| 107 | <p>Determines if the time is really in DST or not. Also checks for invalid and ambiguous. |
|---|
| 108 | |
|---|
| 109 | </p> |
|---|
| 110 | <div class="variablelist"> |
|---|
| 111 | <p class="title"><b>Parameters</b></p> |
|---|
| 112 | <dl> |
|---|
| 113 | <dt><span class="term">current_day</span></dt> |
|---|
| 114 | <dd><p>The day to check for dst </p></dd> |
|---|
| 115 | <dt><span class="term">dst_end_day</span></dt> |
|---|
| 116 | <dd><p>Ending day of dst for the given locality </p></dd> |
|---|
| 117 | <dt><span class="term">dst_end_offset</span></dt> |
|---|
| 118 | <dd><p>Time offset within day given in dst for dst boundary </p></dd> |
|---|
| 119 | <dt><span class="term">dst_start_day</span></dt> |
|---|
| 120 | <dd><p>Starting day of dst for the given locality </p></dd> |
|---|
| 121 | <dt><span class="term">dst_start_offset</span></dt> |
|---|
| 122 | <dd><p>Time offset within day for dst boundary </p></dd> |
|---|
| 123 | <dt><span class="term">time_of_day</span></dt> |
|---|
| 124 | <dd><p>Time offset within the day to check </p></dd> |
|---|
| 125 | </dl> |
|---|
| 126 | </div> |
|---|
| 127 | </li> |
|---|
| 128 | <li> |
|---|
| 129 | <pre class="literallayout"><span class="type">time_is_dst_result</span> |
|---|
| 130 | <a name="id2397912-bb"></a>local_is_dst(<span class="bold"><strong>const</strong></span> date_type & current_day, |
|---|
| 131 | <span class="bold"><strong>const</strong></span> time_duration_type & time_of_day, |
|---|
| 132 | <span class="bold"><strong>const</strong></span> date_type & dst_start_day, |
|---|
| 133 | <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span> dst_start_offset_minutes, |
|---|
| 134 | <span class="bold"><strong>const</strong></span> date_type & dst_end_day, |
|---|
| 135 | <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>int</strong></span> dst_end_offset_minutes, <span class="bold"><strong>long</strong></span> dst_length_minutes) ;</pre> |
|---|
| 136 | <p>Determines if the time is really in DST or not. Also checks for invalid and ambiguous. |
|---|
| 137 | |
|---|
| 138 | </p> |
|---|
| 139 | <div class="variablelist"> |
|---|
| 140 | <p class="title"><b>Parameters</b></p> |
|---|
| 141 | <dl> |
|---|
| 142 | <dt><span class="term">current_day</span></dt> |
|---|
| 143 | <dd><p>The day to check for dst </p></dd> |
|---|
| 144 | <dt><span class="term">dst_end_day</span></dt> |
|---|
| 145 | <dd><p>Ending day of dst for the given locality </p></dd> |
|---|
| 146 | <dt><span class="term">dst_end_offset_minutes</span></dt> |
|---|
| 147 | <dd><p>Offset within day given in dst for dst boundary (eg 120 for US which is 02:00:00) </p></dd> |
|---|
| 148 | <dt><span class="term">dst_length_minutes</span></dt> |
|---|
| 149 | <dd><p>Length of dst adjusment (eg: 60 for US) </p></dd> |
|---|
| 150 | <dt><span class="term">dst_start_day</span></dt> |
|---|
| 151 | <dd><p>Starting day of dst for the given locality </p></dd> |
|---|
| 152 | <dt><span class="term">dst_start_offset_minutes</span></dt> |
|---|
| 153 | <dd><p>Offset within day for dst boundary (eg 120 for US which is 02:00:00) </p></dd> |
|---|
| 154 | <dt><span class="term">time_of_day</span></dt> |
|---|
| 155 | <dd><p>Time offset within the day to check </p></dd> |
|---|
| 156 | </dl> |
|---|
| 157 | </div> |
|---|
| 158 | </li> |
|---|
| 159 | </ol></div> |
|---|
| 160 | </div> |
|---|
| 161 | </div> |
|---|
| 162 | </div> |
|---|
| 163 | <table width="100%"><tr> |
|---|
| 164 | <td align="left"></td> |
|---|
| 165 | <td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td> |
|---|
| 166 | </tr></table> |
|---|
| 167 | <hr> |
|---|
| 168 | <div class="spirit-nav"> |
|---|
| 169 | <a accesskey="p" href="all_date_names_put.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2510544"><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="dst_calc_engine.html"><img src="images/next.png" alt="Next"></a> |
|---|
| 170 | </div> |
|---|
| 171 | </body> |
|---|
| 172 | </html> |
|---|