1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 22 span.virtual_style 23 { 24 font-size : 8pt; 25 color : white; 26 font-weight : bold; 27 background : #0a0; 28 border-left : solid 1px #0f0; 29 border-top : solid 1px #0f0; 30 border-right : solid 1px #060; 31 border-bottom : solid 1px #060; 32 padding-left : 2px; 33 padding-right : 2px; 34 } 35 36 span.protected_style 37 { 38 font-size : 8pt; 39 color : white; 40 font-weight : bold; 41 background : #444; 42 border-left : solid 1px #ccc; 43 border-top : solid 1px #ccc; 44 border-right : solid 1px #222; 45 border-bottom : solid 1px #222; 46 padding-left : 2px; 47 padding-right : 2px; 48 } 49 --></style> 50<title>nn::fnd::DateTime</title> 51 </head> 52 <body> 53<h1><CODE>nn::fnd::DateTime</CODE> Class</h1> 54 <div class="section"> 55<b>Header file: </b>nn/fnd.h</div> 56<h2>Syntax</h2> 57 <div class="section"> 58 <pre class="definition">class DateTime</pre> 59 </div> 60<h2>Description</h2> 61 <div class="section"> 62<p>Indicates a date and time.</p><p>Can handle dates and times from 1900/01/01 00:00:00.000 to 2189/12/31 23:59:59.999.</p><p>The calendar is Gregorian, calculated from 2000/01/01 (Saturday). Each day is treated as having exactly 86400 seconds.</p><p>The <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> class provides addition and subtraction with the <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> class. You can get a <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> object as the sum or difference of a <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> and <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> object. You can get a <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> object as the difference between two <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> objects. The upper and lower limits for <CODE>DateTime</CODE> are configured to prevent overflows in the <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> object obtained as the difference between two <CODE>DateTime</CODE> objects.</p><!-- write here --></div> 63 <a name="constant" id="constant"> 64<h2>Member Constants</h2> 65 <div class="section"> 66 <table class="members"> 67 <tr> 68 <td width="100"> 69<span class="static_style" title="static">S</span> 70 </td> 71 <th> 72<span class="argument"><a href="../../../nn/fnd/DateTime/MIN_DATETIME.html">MIN_DATETIME</a></span> 73 </th> 74<td>The oldest (most antiquated) date and time that can be handled by the <CODE>DateTime</CODE> class.</td> 75 </tr> 76 <tr> 77 <td width="100"> 78<span class="static_style" title="static">S</span> 79 </td> 80 <th> 81<span class="argument"><a href="../../../nn/fnd/DateTime/MAX_DATETIME.html">MAX_DATETIME</a></span> 82 </th> 83<td>The most distant future date and time that can be handled by the <CODE>DateTime</CODE> class.</td> 84 </tr> </table> 85 </div> 86 </a> <a name="function" id="function"> 87<h2>Member Functions</h2> 88 <div class="section"> 89 <table class="members"> 90 <tr> 91 <td width="100"> </td> 92 <th> 93<a href="../../../nn/fnd/DateTime/DateTime.html"><CODE>DateTime</CODE></a> 94 </th> 95<td>Creates a <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> object set to 2000-01-01 00:00:00.000.</td> 96 </tr> 97 <tr> 98 <td width="100"> </td> 99 <th> 100<a href="../../../nn/fnd/DateTime/GetYear.html"><CODE>GetYear</CODE></a> 101 </th> 102<td>Gets the year.</td> 103 </tr> 104 <tr> 105 <td width="100"> </td> 106 <th> 107<a href="../../../nn/fnd/DateTime/GetMonth.html"><CODE>GetMonth</CODE></a> 108 </th> 109<td>Gets the month.</td> 110 </tr> 111 <tr> 112 <td width="100"> </td> 113 <th> 114<a href="../../../nn/fnd/DateTime/GetDay.html"><CODE>GetDay</CODE></a> 115 </th> 116<td>Gets the date of the day.</td> 117 </tr> 118 <tr> 119 <td width="100"> </td> 120 <th> 121<a href="../../../nn/fnd/DateTime/GetWeek.html"><CODE>GetWeek</CODE></a> 122 </th> 123<td>Gets the name of the day of the week.</td> 124 </tr> 125 <tr> 126 <td width="100"> </td> 127 <th> 128<a href="../../../nn/fnd/DateTime/GetHour.html"><CODE>GetHour</CODE></a> 129 </th> 130<td>Gets the hour.</td> 131 </tr> 132 <tr> 133 <td width="100"> </td> 134 <th> 135<a href="../../../nn/fnd/DateTime/GetMinute.html"><CODE>GetMinute</CODE></a> 136 </th> 137<td>Gets the minute.</td> 138 </tr> 139 <tr> 140 <td width="100"> </td> 141 <th> 142<a href="../../../nn/fnd/DateTime/GetSecond.html"><CODE>GetSecond</CODE></a> 143 </th> 144<td>Gets the second.</td> 145 </tr> 146 <tr> 147 <td width="100"> </td> 148 <th> 149<a href="../../../nn/fnd/DateTime/GetMilliSecond.html"><CODE>GetMilliSecond</CODE></a> 150 </th> 151<td>Gets the millisecond.</td> 152 </tr> 153 <tr> 154 <td width="100"> </td> 155 <th> 156<a href="../../../nn/fnd/DateTime/GetParameters.html"><CODE>GetParameters</CODE></a> 157 </th> 158<td>Gets all the year, month, date, hour, minute, and second values.</td> 159 </tr> 160 <tr> 161 <td width="100"> </td> 162 <th> 163<a href="../../../nn/fnd/DateTime/ReplaceYear.html"><CODE>ReplaceYear</CODE></a> 164 </th> 165<td>Replaces the year.</td> 166 </tr> 167 <tr> 168 <td width="100"> </td> 169 <th> 170<a href="../../../nn/fnd/DateTime/ReplaceMonth.html"><CODE>ReplaceMonth</CODE></a> 171 </th> 172<td>Replaces the month.</td> 173 </tr> 174 <tr> 175 <td width="100"> </td> 176 <th> 177<a href="../../../nn/fnd/DateTime/ReplaceDay.html"><CODE>ReplaceDay</CODE></a> 178 </th> 179<td>Replaces the day.</td> 180 </tr> 181 <tr> 182 <td width="100"> </td> 183 <th> 184<a href="../../../nn/fnd/DateTime/ReplaceHour.html"><CODE>ReplaceHour</CODE></a> 185 </th> 186<td>Replaces the hour.</td> 187 </tr> 188 <tr> 189 <td width="100"> </td> 190 <th> 191<a href="../../../nn/fnd/DateTime/ReplaceMinute.html"><CODE>ReplaceMinute</CODE></a> 192 </th> 193<td>Replaces the minute.</td> 194 </tr> 195 <tr> 196 <td width="100"> </td> 197 <th> 198<a href="../../../nn/fnd/DateTime/ReplaceSecond.html"><CODE>ReplaceSecond</CODE></a> 199 </th> 200<td>Replaces the second.</td> 201 </tr> 202 <tr> 203 <td width="100"> </td> 204 <th> 205<a href="../../../nn/fnd/DateTime/ReplaceMilliSecond.html"><CODE>ReplaceMilliSecond</CODE></a> 206 </th> 207<td>Replaces the millisecond.</td> 208 </tr> 209 <tr> 210 <td width="100"> </td> 211 <th> 212<a href="../../../nn/fnd/DateTime/operator+=.html"><CODE>operator+=</CODE></a> 213 </th> 214<td>The <CODE>+=</CODE> operator for the <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> and <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> classes.</td> 215 </tr> 216 <tr> 217 <td width="100"> </td> 218 <th> 219<a href="../../../nn/fnd/DateTime/operator-2d=.html"><CODE>operator-=</CODE></a> 220 </th> 221<td>The <CODE>-=</CODE> operator for the <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> and <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> classes.</td> 222 </tr> 223 <tr> 224 <td width="100"> 225<span class="static_style" title="static">S</span> </td> 226 <th> 227<a href="../../../nn/fnd/DateTime/FromParameters.html"><CODE>FromParameters</CODE></a> 228 </th> 229<td>Generates a <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> object from a year, month, day, hour, minute, and second value.</td> 230 </tr> 231 <tr> 232 <td width="100"> 233<span class="static_style" title="static">S</span> </td> 234 <th> 235<a href="../../../nn/fnd/DateTime/IsValidDate.html"><CODE>IsValidDate</CODE></a> 236 </th> 237<td>Determines if the date is valid.</td> 238 </tr> 239 <tr> 240 <td width="100"> 241<span class="static_style" title="static">S</span> </td> 242 <th> 243<a href="../../../nn/fnd/DateTime/IsValidParameters.html"><CODE>IsValidParameters</CODE></a> 244 </th> 245<td>Determines if the date and time are valid.</td> 246 </tr> 247 <tr> 248 <td width="100"> 249<span class="static_style" title="static">S</span> </td> 250 <th> 251<a href="../../../nn/fnd/DateTime/IsLeapYear.html"><CODE>IsLeapYear</CODE></a> 252 </th> 253<td>Determines if the year is a leap year.</td> 254 </tr> 255 <tr> 256 <td width="100"> 257<span class="static_style" title="static">S</span> </td> 258 <th> 259<a href="../../../nn/fnd/DateTime/DateToDays.html"><CODE>DateToDays</CODE></a> 260 </th> 261<td>Calculates the number of days elapsed from 2000/01/01 until the given date.</td> 262 </tr> 263 <tr> 264 <td width="100"> 265<span class="static_style" title="static">S</span> </td> 266 <th> 267<a href="../../../nn/fnd/DateTime/DaysToDate.html"><CODE>DaysToDate</CODE></a> 268 </th> 269<td>Calculates the date from the given number of days elapsed since 2000/01/01.</td> 270 </tr> 271 <tr> 272 <td width="100"> 273<span class="static_style" title="static">S</span> </td> 274 <th> 275<a href="../../../nn/fnd/DateTime/DaysToWeekday.html"><CODE>DaysToWeekday</CODE></a> 276 </th> 277<td>Calculates the day of the week from the given number of days elapsed since 2000/01/01.</td> 278 </tr> 279 <tr> 280 <td width="100"> 281<span class="static_style" title="static">S</span> </td> 282 <th> 283<a href="../../../nn/fnd/DateTime/GetNow.html"><CODE>GetNow</CODE></a> 284 </th> 285<td>Gets the current date and time.</td> 286 </tr> </table> 287 </div> 288 </a> <a name="function" id="function"> 289 <h2> 290Friend functions 291 </h2> 292 <div class="section"> 293 <table class="members"> 294 <tr> 295 <td width="100"> </td> 296 <th> 297<a href="../../../nn/fnd/DateTime/operator==.html">operator==</a> 298 </th> 299<td>The <CODE> ==</CODE> operator between two <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> classes.</td> 300 </tr> 301 <tr> 302 <td width="100"> </td> 303 <th> 304<a href="../../../nn/fnd/DateTime/operator!=.html">operator!=</a> 305 </th> 306<td>The <CODE>!=</CODE> operator between two <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> classes.</td> 307 </tr> 308 <tr> 309 <td width="100"> </td> 310 <th> 311<a href="../../../nn/fnd/DateTime/operator-3c.html">operator<</a> 312 </th> 313<td>The <CODE><</CODE> operator between two <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> classes.</td> 314 </tr> 315 <tr> 316 <td width="100"> </td> 317 <th> 318<a href="../../../nn/fnd/DateTime/operator-3e.html">operator></a> 319 </th> 320<td>The <CODE>></CODE> operator between two <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> classes.</td> 321 </tr> 322 <tr> 323 <td width="100"> </td> 324 <th> 325<a href="../../../nn/fnd/DateTime/operator-3c=.html">operator<=</a> 326 </th> 327<td>The <CODE><=</CODE> operator between two <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> classes.</td> 328 </tr> 329 <tr> 330 <td width="100"> </td> 331 <th> 332<a href="../../../nn/fnd/DateTime/operator-3e=.html">operator>=</a> 333 </th> 334<td>The <CODE>>=</CODE> operator between two <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> classes.</td> 335 </tr> 336 <tr> 337 <td width="100"> </td> 338 <th> 339<a href="../../../nn/fnd/DateTime/operator+.html">operator+</a> 340 </th> 341<td>The <CODE>+</CODE> operator for the <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> and <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> classes.</td> 342 </tr> 343 <tr> 344 <td width="100"> </td> 345 <th> 346<a href="../../../nn/fnd/DateTime/operator-2d.html">operator-</a> 347 </th> 348<td>The <CODE>-</CODE> operator for the <a href="../../../nn/fnd/DateTime/Overview.html"><CODE>DateTime</CODE></a> and <a href="../../../nn/fnd/TimeSpan/Overview.html"><CODE>TimeSpan</CODE></a> classes.</td> 349 </tr> </table> 350 </div> 351 </a> 352<h2>Revision History</h2> 353 <div class="section"> 354 <dl class="history"> 355 <dt>2010/09/15</dt> 356<dd>Added information on addition and subtraction with <CODE>DateTime</CODE> and <CODE>TimeSpan</CODE> objects. Noted that the values obtained by subtracting two <CODE>DateTime</CODE> objects are constrained to the range that can be represented by <CODE>TimeSpan</CODE> objects. 357 </dd> 358 <dt>2010/01/29</dt> 359<dd>Initial version.<br /> 360 </dd> 361 </dl> 362 </div> 363 <hr><p>CONFIDENTIAL</p></body> 364</html>