1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::DateTime</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="symbol">class DateTime</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> DateTime<br />
<b>Header:</b> Poco/DateTime.h</p>
<h2>Description</h2>
<div class="description">
<p>This class represents an instant in time, expressed in years, months, days, hours, minutes, seconds and milliseconds based on the Gregorian calendar. The class is mainly useful for conversions between UTC, Julian day and Gregorian calendar dates. </p>
<p>The date and time stored in a <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> is always in UTC (Coordinated Universal Time) and thus independent of the timezone in effect on the system. </p>
<p>Conversion calculations are based on algorithms collected and described by Peter Baum at <a href="http://vsg.cape.com/~pbaum/date/date0.htm" target="_blank">http://vsg.cape.com/~pbaum/date/date0.htm</a> </p>
<p>Internally, this class stores a date/time in two forms (UTC and broken down) for performance reasons. Only use this class for conversions between date/time representations. Use the <a href="Poco.Timestamp.html" title="class Poco::Timestamp">Timestamp</a> class for everything else. </p>
<p>Notes: </p>
<ul>
<li>Zero is a valid year (in accordance with ISO 8601 and astronomical year numbering) </li>
<li>Year zero (0) is a leap year </li>
<li>Negative years (years preceding 1 BC) are not supported </li>
</ul>
<p>For more information, please see: </p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Gregorian_Calendar" target="_blank">http://en.wikipedia.org/wiki/Gregorian_Calendar</a> </li>
<li><a href="http://en.wikipedia.org/wiki/Julian_day" target="_blank">http://en.wikipedia.org/wiki/Julian_day</a> </li>
<li><a href="http://en.wikipedia.org/wiki/UTC" target="_blank">http://en.wikipedia.org/wiki/UTC</a> </li>
<li><a href="http://en.wikipedia.org/wiki/ISO_8601" target="_blank">http://en.wikipedia.org/wiki/ISO_8601</a> </li>
</ul>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.DateTime.html#4384" title="Poco::DateTime::assign()">assign</a>, <a href="Poco.DateTime.html#4468" title="Poco::DateTime::computeDaytime()">computeDaytime</a>, <a href="Poco.DateTime.html#4466" title="Poco::DateTime::computeGregorian()">computeGregorian</a>, <a href="Poco.DateTime.html#4399" title="Poco::DateTime::day()">day</a>, <a href="Poco.DateTime.html#4400" title="Poco::DateTime::dayOfWeek()">dayOfWeek</a>, <a href="Poco.DateTime.html#4401" title="Poco::DateTime::dayOfYear()">dayOfYear</a>, <a href="Poco.DateTime.html#4441" title="Poco::DateTime::daysOfMonth()">daysOfMonth</a>, <a href="Poco.DateTime.html#4402" title="Poco::DateTime::hour()">hour</a>, <a href="Poco.DateTime.html#4403" title="Poco::DateTime::hourAMPM()">hourAMPM</a>, <a href="Poco.DateTime.html#4404" title="Poco::DateTime::isAM()">isAM</a>, <a href="Poco.DateTime.html#4439" title="Poco::DateTime::isLeapYear()">isLeapYear</a>, <a href="Poco.DateTime.html#4405" title="Poco::DateTime::isPM()">isPM</a>, <a href="Poco.DateTime.html#4444" title="Poco::DateTime::isValid()">isValid</a>, <a href="Poco.DateTime.html#4410" title="Poco::DateTime::julianDay()">julianDay</a>, <a href="Poco.DateTime.html#4437" title="Poco::DateTime::makeLocal()">makeLocal</a>, <a href="Poco.DateTime.html#4435" title="Poco::DateTime::makeUTC()">makeUTC</a>, <a href="Poco.DateTime.html#4409" title="Poco::DateTime::microsecond()">microsecond</a>, <a href="Poco.DateTime.html#4408" title="Poco::DateTime::millisecond()">millisecond</a>, <a href="Poco.DateTime.html#4406" title="Poco::DateTime::minute()">minute</a>, <a href="Poco.DateTime.html#4396" title="Poco::DateTime::month()">month</a>, <a href="Poco.DateTime.html#4415" title="Poco::DateTime::operator !=()">operator !=</a>, <a href="Poco.DateTime.html#4425" title="Poco::DateTime::operator +()">operator +</a>, <a href="Poco.DateTime.html#4431" title="Poco::DateTime::operator +=()">operator +=</a>, <a href="Poco.DateTime.html#4427" title="Poco::DateTime::operator -()">operator -</a>, <a href="Poco.DateTime.html#4433" title="Poco::DateTime::operator -=()">operator -=</a>, <a href="Poco.DateTime.html#4417" title="Poco::DateTime::operator <()">operator <</a>, <a href="Poco.DateTime.html#4419" title="Poco::DateTime::operator <=()">operator <=</a>, <a href="Poco.DateTime.html#4378" title="Poco::DateTime::operator =()">operator =</a>, <a href="Poco.DateTime.html#4413" title="Poco::DateTime::operator ==()">operator ==</a>, <a href="Poco.DateTime.html#4421" title="Poco::DateTime::operator >()">operator ></a>, <a href="Poco.DateTime.html#4423" title="Poco::DateTime::operator >=()">operator >=</a>, <a href="Poco.DateTime.html#4407" title="Poco::DateTime::second()">second</a>, <a href="Poco.DateTime.html#4393" title="Poco::DateTime::swap()">swap</a>, <a href="Poco.DateTime.html#4411" title="Poco::DateTime::timestamp()">timestamp</a>, <a href="Poco.DateTime.html#4453" title="Poco::DateTime::toJulianDay()">toJulianDay</a>, <a href="Poco.DateTime.html#4464" title="Poco::DateTime::toUtcTime()">toUtcTime</a>, <a href="Poco.DateTime.html#4412" title="Poco::DateTime::utcTime()">utcTime</a>, <a href="Poco.DateTime.html#4397" title="Poco::DateTime::week()">week</a>, <a href="Poco.DateTime.html#4395" title="Poco::DateTime::year()">year</a></p>
<h2>Enumerations</h2>
<h3><a name="4350">DaysOfWeek</a></h3>
<div class="description">
<p>Symbolic names for week day numbers (0 to 6). </p>
</div>
<p class="decl"><a name="4351">SUNDAY</a> = 0</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4352">MONDAY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4353">TUESDAY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4354">WEDNESDAY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4355">THURSDAY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4356">FRIDAY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4357">SATURDAY</a></p>
<div class="description">
<p></p>
</div>
<h3><a name="4337">Months</a></h3>
<div class="description">
<p>Symbolic names for month numbers (1 to 12). </p>
</div>
<p class="decl"><a name="4338">JANUARY</a> = 1</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4339">FEBRUARY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4340">MARCH</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4341">APRIL</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4342">MAY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4343">JUNE</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4344">JULY</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4345">AUGUST</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4346">SEPTEMBER</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4347">OCTOBER</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4348">NOVEMBER</a></p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="4349">DECEMBER</a></p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="4358">DateTime</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>();</p>
<div class="description">
<p>Creates a <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> for the current date and time. </p>
</div>
<h3><a name="4359">DateTime</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>(<br /> const <a href="Poco.Timestamp.html" title="class Poco::Timestamp">Timestamp</a> & timestamp<br />);</p>
<div class="description">
<p>Creates a <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> for the date and time given in a <a href="Poco.Timestamp.html" title="class Poco::Timestamp">Timestamp</a>. </p>
</div>
<h3><a name="4370">DateTime</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>(<br /> double julianDay<br />);</p>
<div class="description">
<p>Creates a <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> for the given Julian day. </p>
</div>
<h3><a name="4375">DateTime</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>(<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />);</p>
<div class="description">
<p>Copy constructor. Creates the <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> from another one. </p>
</div>
<h3><a name="4372">DateTime</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>(<br /> <a href="Poco.Timestamp.html#11150" title="Poco::Timestamp::UtcTimeVal">Timestamp::UtcTimeVal</a> utcTime,<br /> <a href="Poco.Timestamp.html#11151" title="Poco::Timestamp::TimeDiff">Timestamp::TimeDiff</a> diff<br />);</p>
<div class="description">
<p>Creates a <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> from an UtcTimeVal and a TimeDiff. </p>
<p>Mainly used internally by <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> and friends. </p>
</div>
<h3><a name="4361">DateTime</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>(<br /> int year,<br /> int month,<br /> int day,<br /> int hour = 0,<br /> int minute = 0,<br /> int second = 0,<br /> int millisecond = 0,<br /> int microsecond = 0<br />);</p>
<div class="description">
<p>Creates a <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> for the given Gregorian date and time. </p>
<ul>
<li>year is from 0 to 9999. </li>
<li>month is from 1 to 12. </li>
<li>day is from 1 to 31. </li>
<li>hour is from 0 to 23. </li>
<li>minute is from 0 to 59. </li>
<li>second is from 0 to 59. </li>
<li>millisecond is from 0 to 999. </li>
<li>microsecond is from 0 to 999. </li>
</ul>
</div>
<h2>Destructor</h2>
<h3><a name="4377">~DateTime</a></h3>
<p class="decl">~<a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="4384">assign</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & assign(<br /> int year,<br /> int month,<br /> int day,<br /> int hour = 0,<br /> int minute = 0,<br /> int second = 0,<br /> int millisecond = 0,<br /> int microseconds = 0<br />);</p>
<div class="description">
<p>Assigns a Gregorian date and time. </p>
<ul>
<li>year is from 0 to 9999. </li>
<li>month is from 1 to 12. </li>
<li>day is from 1 to 31. </li>
<li>hour is from 0 to 23. </li>
<li>minute is from 0 to 59. </li>
<li>second is from 0 to 59. </li>
<li>millisecond is from 0 to 999. </li>
<li>microsecond is from 0 to 999. </li>
</ul>
</div>
<h3><a name="4399">day</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int day() const;</p>
<div class="description">
<p>Returns the day witin the month (1 to 31). </p>
</div>
<h3><a name="4400">dayOfWeek</a></h3>
<p class="decl">int dayOfWeek() const;</p>
<div class="description">
<p>Returns the weekday (0 to 6, where 0 = Sunday, 1 = Monday, ..., 6 = Saturday). </p>
</div>
<h3><a name="4401">dayOfYear</a></h3>
<p class="decl">int dayOfYear() const;</p>
<div class="description">
<p>Returns the number of the day in the year. January 1 is 1, February 1 is 32, etc. </p>
</div>
<h3><a name="4441">daysOfMonth</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static int daysOfMonth(<br /> int year,<br /> int month<br />);</p>
<div class="description">
<p>Returns the number of days in the given month and year. Month is from 1 to 12. </p>
</div>
<h3><a name="4402">hour</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int hour() const;</p>
<div class="description">
<p>Returns the hour (0 to 23). </p>
</div>
<h3><a name="4403">hourAMPM</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int hourAMPM() const;</p>
<div class="description">
<p>Returns the hour (0 to 12). </p>
</div>
<h3><a name="4404">isAM</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool isAM() const;</p>
<div class="description">
<p>Returns true if hour < 12; </p>
</div>
<h3><a name="4439">isLeapYear</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static bool isLeapYear(<br /> int year<br />);</p>
<div class="description">
<p>Returns true if the given year is a leap year; false otherwise. </p>
</div>
<h3><a name="4405">isPM</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool isPM() const;</p>
<div class="description">
<p>Returns true if hour >= 12. </p>
</div>
<h3><a name="4444">isValid</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static bool isValid(<br /> int year,<br /> int month,<br /> int day,<br /> int hour = 0,<br /> int minute = 0,<br /> int second = 0,<br /> int millisecond = 0,<br /> int microsecond = 0<br />);</p>
<div class="description">
<p>Checks if the given date and time is valid (all arguments are within a proper range). </p>
<p>Returns true if all arguments are valid, false otherwise. </p>
</div>
<h3><a name="4410">julianDay</a></h3>
<p class="decl">double julianDay() const;</p>
<div class="description">
<p>Returns the julian day for the date and time. </p>
</div>
<h3><a name="4437">makeLocal</a></h3>
<p class="decl">void makeLocal(<br /> int tzd<br />);</p>
<div class="description">
<p>Converts a UTC time into a local time, by applying the given time zone differential. </p>
</div>
<h3><a name="4435">makeUTC</a></h3>
<p class="decl">void makeUTC(<br /> int tzd<br />);</p>
<div class="description">
<p>Converts a local time into UTC, by applying the given time zone differential. </p>
</div>
<h3><a name="4409">microsecond</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int microsecond() const;</p>
<div class="description">
<p>Returns the microsecond (0 to 999) </p>
</div>
<h3><a name="4408">millisecond</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int millisecond() const;</p>
<div class="description">
<p>Returns the millisecond (0 to 999) </p>
</div>
<h3><a name="4406">minute</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int minute() const;</p>
<div class="description">
<p>Returns the minute (0 to 59). </p>
</div>
<h3><a name="4396">month</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int month() const;</p>
<div class="description">
<p>Returns the month (1 to 12). </p>
</div>
<h3><a name="4415">operator !=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator != (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4425">operator +</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> operator + (<br /> const <a href="Poco.Timespan.html" title="class Poco::Timespan">Timespan</a> & span<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4431">operator +=</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & operator += (<br /> const <a href="Poco.Timespan.html" title="class Poco::Timespan">Timespan</a> & span<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="4427">operator -</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> operator - (<br /> const <a href="Poco.Timespan.html" title="class Poco::Timespan">Timespan</a> & span<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4429">operator -</a></h3>
<p class="decl"><a href="Poco.Timespan.html" title="class Poco::Timespan">Timespan</a> operator - (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4433">operator -=</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & operator -= (<br /> const <a href="Poco.Timespan.html" title="class Poco::Timespan">Timespan</a> & span<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="4417">operator <</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator < (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4419">operator <=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator <= (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4378">operator =</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & operator = (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />);</p>
<div class="description">
<p>Assigns another <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a>. </p>
</div>
<h3><a name="4380">operator =</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & operator = (<br /> const <a href="Poco.Timestamp.html" title="class Poco::Timestamp">Timestamp</a> & timestamp<br />);</p>
<div class="description">
<p>Assigns a <a href="Poco.Timestamp.html" title="class Poco::Timestamp">Timestamp</a>. </p>
</div>
<h3><a name="4382">operator =</a></h3>
<p class="decl"><a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & operator = (<br /> double julianDay<br />);</p>
<div class="description">
<p>Assigns a Julian day. </p>
</div>
<h3><a name="4413">operator ==</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator == (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4421">operator ></a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator > (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4423">operator >=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator >= (<br /> const <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="4407">second</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int second() const;</p>
<div class="description">
<p>Returns the second (0 to 59). </p>
</div>
<h3><a name="4393">swap</a></h3>
<p class="decl">void swap(<br /> <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> & dateTime<br />);</p>
<div class="description">
<p>Swaps the <a href="Poco.DateTime.html" title="class Poco::DateTime">DateTime</a> with another one. </p>
</div>
<h3><a name="4411">timestamp</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Timestamp.html" title="class Poco::Timestamp">Timestamp</a> timestamp() const;</p>
<div class="description">
<p>Returns the date and time expressed as a <a href="Poco.Timestamp.html" title="class Poco::Timestamp">Timestamp</a>. </p>
</div>
<h3><a name="4412">utcTime</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Timestamp.html#11150" title="Poco::Timestamp::UtcTimeVal">Timestamp::UtcTimeVal</a> utcTime() const;</p>
<div class="description">
<p>Returns the date and time expressed in UTC-based time. UTC base time is midnight, October 15, 1582. Resolution is 100 nanoseconds. </p>
</div>
<h3><a name="4397">week</a></h3>
<p class="decl">int week(<br /> int firstDayOfWeek = MONDAY<br />) const;</p>
<div class="description">
<p>Returns the week number within the year. FirstDayOfWeek should be either <a href="Poco.DateTime.html#4351" title="Poco::DateTime::SUNDAY">SUNDAY</a> (0) or <a href="Poco.DateTime.html#4352" title="Poco::DateTime::MONDAY">MONDAY</a> (1). The returned week number will be from 0 to 53. Week number 1 is the week containing January 4. This is in accordance to ISO 8601. </p>
<p>The following example assumes that firstDayOfWeek is <a href="Poco.DateTime.html#4352" title="Poco::DateTime::MONDAY">MONDAY</a>. For 2005, which started on a Saturday, week 1 will be the week starting on Monday, January 3. January 1 and 2 will fall within week 0 (or the last week of the previous year). </p>
<p>For 2007, which starts on a Monday, week 1 will be the week startung on Monday, January 1. There will be no week 0 in 2007. </p>
</div>
<h3><a name="4395">year</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int year() const;</p>
<div class="description">
<p>Returns the year. </p>
</div>
<h3><a name="4468">computeDaytime</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void computeDaytime();</p>
<div class="description">
<p>Extracts the daytime (hours, minutes, seconds, etc.) from the stored utcTime. </p>
</div>
<h3><a name="4466">computeGregorian</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void computeGregorian(<br /> double julianDay<br />);</p>
<div class="description">
<p>Computes the Gregorian date for the given Julian day. See <<a href="http://vsg.cape.com/~pbaum/date/injdimp.htm" target="_blank">http://vsg.cape.com/~pbaum/date/injdimp.htm</a>>, section 3.3.1 for the algorithm. </p>
</div>
<h3><a name="4453">toJulianDay</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static double toJulianDay(<br /> <a href="Poco.Timestamp.html#11150" title="Poco::Timestamp::UtcTimeVal">Timestamp::UtcTimeVal</a> utcTime<br />);</p>
<div class="description">
<p>Computes the Julian day for an UTC time. </p>
</div>
<h3><a name="4455">toJulianDay</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static double toJulianDay(<br /> int year,<br /> int month,<br /> int day,<br /> int hour = 0,<br /> int minute = 0,<br /> int second = 0,<br /> int millisecond = 0,<br /> int microsecond = 0<br />);</p>
<div class="description">
<p>Computes the Julian day for a gregorian calendar date and time. See <<a href="http://vsg.cape.com/~pbaum/date/jdimp.htm" target="_blank">http://vsg.cape.com/~pbaum/date/jdimp.htm</a>>, section 2.3.1 for the algorithm. </p>
</div>
<h3><a name="4464">toUtcTime</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static <a href="Poco.Timestamp.html#11150" title="Poco::Timestamp::UtcTimeVal">Timestamp::UtcTimeVal</a> toUtcTime(<br /> double julianDay<br />);</p>
<div class="description">
<p>Computes the UTC time for a Julian day. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>
</div>
</body>
</html>
|