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