/usr/share/doc/libjoda-time-java/api/org/joda/time/DateTimeUtils.html is in libjoda-time-java-doc 2.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>DateTimeUtils (Joda-Time 2.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DateTimeUtils (Joda-Time 2.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateTimeUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/joda/time/DateTimeFieldType.html" title="class in org.joda.time"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/joda/time/DateTimeUtils.MillisProvider.html" title="interface in org.joda.time"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/joda/time/DateTimeUtils.html" target="_top">Frames</a></li>
<li><a href="DateTimeUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.joda.time</div>
<h2 title="Class DateTimeUtils" class="title">Class DateTimeUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.joda.time.DateTimeUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">DateTimeUtils</span>
extends java.lang.Object</pre>
<div class="block">DateTimeUtils provide public utility methods for the date-time library.
<p>
DateTimeUtils is thread-safe although shared static variables are used.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.0</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface </code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.MillisProvider.html" title="interface in org.joda.time">DateTimeUtils.MillisProvider</a></strong></code>
<div class="block">A millisecond provider, allowing control of the system clock.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#DateTimeUtils()">DateTimeUtils</a></strong>()</code>
<div class="block">Restrictive constructor</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#currentTimeMillis()">currentTimeMillis</a></strong>()</code>
<div class="block">Gets the current time in milliseconds.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#fromJulianDay(double)">fromJulianDay</a></strong>(double julianDay)</code>
<div class="block">Creates a date-time from a Julian Day.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getChronology(org.joda.time.Chronology)">getChronology</a></strong>(<a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> chrono)</code>
<div class="block">Gets the chronology handling null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.text.DateFormatSymbols</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getDateFormatSymbols(java.util.Locale)">getDateFormatSymbols</a></strong>(java.util.Locale locale)</code>
<div class="block">Gets the <code>DateFormatSymbols</code> based on the given locale.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.util.Map<java.lang.String,<a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a>></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getDefaultTimeZoneNames()">getDefaultTimeZoneNames</a></strong>()</code>
<div class="block">Gets the default map of time zone names.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getDurationMillis(org.joda.time.ReadableDuration)">getDurationMillis</a></strong>(<a href="../../../org/joda/time/ReadableDuration.html" title="interface in org.joda.time">ReadableDuration</a> duration)</code>
<div class="block">Gets the millisecond duration from the specified duration object handling null.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getInstantChronology(org.joda.time.ReadableInstant)">getInstantChronology</a></strong>(<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</code>
<div class="block">Gets the chronology from the specified instant object handling null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getInstantMillis(org.joda.time.ReadableInstant)">getInstantMillis</a></strong>(<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</code>
<div class="block">Gets the millisecond instant from the specified instant object handling null.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getIntervalChronology(org.joda.time.ReadableInstant, org.joda.time.ReadableInstant)">getIntervalChronology</a></strong>(<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> start,
<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> end)</code>
<div class="block">Gets the chronology from the specified instant based interval handling null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getIntervalChronology(org.joda.time.ReadableInterval)">getIntervalChronology</a></strong>(<a href="../../../org/joda/time/ReadableInterval.html" title="interface in org.joda.time">ReadableInterval</a> interval)</code>
<div class="block">Gets the chronology from the specified interval object handling null.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../org/joda/time/PeriodType.html" title="class in org.joda.time">PeriodType</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getPeriodType(org.joda.time.PeriodType)">getPeriodType</a></strong>(<a href="../../../org/joda/time/PeriodType.html" title="class in org.joda.time">PeriodType</a> type)</code>
<div class="block">Gets the period type handling null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../org/joda/time/ReadableInterval.html" title="interface in org.joda.time">ReadableInterval</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getReadableInterval(org.joda.time.ReadableInterval)">getReadableInterval</a></strong>(<a href="../../../org/joda/time/ReadableInterval.html" title="interface in org.joda.time">ReadableInterval</a> interval)</code>
<div class="block">Gets the interval handling null.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#getZone(org.joda.time.DateTimeZone)">getZone</a></strong>(<a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a> zone)</code>
<div class="block">Gets the zone handling null.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#isContiguous(org.joda.time.ReadablePartial)">isContiguous</a></strong>(<a href="../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</code>
<div class="block">Checks whether the partial is contiguous.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#setCurrentMillisFixed(long)">setCurrentMillisFixed</a></strong>(long fixedMillis)</code>
<div class="block">Sets the current time to return a fixed millisecond time.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#setCurrentMillisOffset(long)">setCurrentMillisOffset</a></strong>(long offsetMillis)</code>
<div class="block">Sets the current time to return the system time plus an offset.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#setCurrentMillisProvider(org.joda.time.DateTimeUtils.MillisProvider)">setCurrentMillisProvider</a></strong>(<a href="../../../org/joda/time/DateTimeUtils.MillisProvider.html" title="interface in org.joda.time">DateTimeUtils.MillisProvider</a> millisProvider)</code>
<div class="block">Sets the provider of the current time to class specified.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#setCurrentMillisSystem()">setCurrentMillisSystem</a></strong>()</code>
<div class="block">Resets the current time to return the system time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#setDefaultTimeZoneNames(java.util.Map)">setDefaultTimeZoneNames</a></strong>(java.util.Map<java.lang.String,<a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a>> names)</code>
<div class="block">Sets the default map of time zone names.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#toJulianDay(long)">toJulianDay</a></strong>(long epochMillis)</code>
<div class="block">Calculates the astronomical Julian Day for an instant.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../org/joda/time/DateTimeUtils.html#toJulianDayNumber(long)">toJulianDayNumber</a></strong>(long epochMillis)</code>
<div class="block">Calculates the astronomical Julian Day Number for an instant.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DateTimeUtils()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DateTimeUtils</h4>
<pre>protected DateTimeUtils()</pre>
<div class="block">Restrictive constructor</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="currentTimeMillis()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>currentTimeMillis</h4>
<pre>public static final long currentTimeMillis()</pre>
<div class="block">Gets the current time in milliseconds.
<p>
By default this returns <code>System.currentTimeMillis()</code>.
This may be changed using other methods in this class.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the current time in milliseconds from 1970-01-01T00:00:00Z</dd></dl>
</li>
</ul>
<a name="setCurrentMillisSystem()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCurrentMillisSystem</h4>
<pre>public static final void setCurrentMillisSystem()
throws java.lang.SecurityException</pre>
<div class="block">Resets the current time to return the system time.
<p>
This method changes the behaviour of <a href="../../../org/joda/time/DateTimeUtils.html#currentTimeMillis()"><code>currentTimeMillis()</code></a>.
Whenever the current time is queried, <code>System.currentTimeMillis()</code> is used.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - if the application does not have sufficient security rights</dd></dl>
</li>
</ul>
<a name="setCurrentMillisFixed(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCurrentMillisFixed</h4>
<pre>public static final void setCurrentMillisFixed(long fixedMillis)
throws java.lang.SecurityException</pre>
<div class="block">Sets the current time to return a fixed millisecond time.
<p>
This method changes the behaviour of <a href="../../../org/joda/time/DateTimeUtils.html#currentTimeMillis()"><code>currentTimeMillis()</code></a>.
Whenever the current time is queried, the same millisecond time will be returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>fixedMillis</code> - the fixed millisecond time to use</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - if the application does not have sufficient security rights</dd></dl>
</li>
</ul>
<a name="setCurrentMillisOffset(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCurrentMillisOffset</h4>
<pre>public static final void setCurrentMillisOffset(long offsetMillis)
throws java.lang.SecurityException</pre>
<div class="block">Sets the current time to return the system time plus an offset.
<p>
This method changes the behaviour of <a href="../../../org/joda/time/DateTimeUtils.html#currentTimeMillis()"><code>currentTimeMillis()</code></a>.
Whenever the current time is queried, <code>System.currentTimeMillis()</code> is used
and then offset by adding the millisecond value specified here.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>offsetMillis</code> - the fixed millisecond time to use</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - if the application does not have sufficient security rights</dd></dl>
</li>
</ul>
<a name="setCurrentMillisProvider(org.joda.time.DateTimeUtils.MillisProvider)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCurrentMillisProvider</h4>
<pre>public static final void setCurrentMillisProvider(<a href="../../../org/joda/time/DateTimeUtils.MillisProvider.html" title="interface in org.joda.time">DateTimeUtils.MillisProvider</a> millisProvider)
throws java.lang.SecurityException</pre>
<div class="block">Sets the provider of the current time to class specified.
<p>
This method changes the behaviour of <a href="../../../org/joda/time/DateTimeUtils.html#currentTimeMillis()"><code>currentTimeMillis()</code></a>.
Whenever the current time is queried, the specified class will be called.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>millisProvider</code> - the provider of the current time to use, not null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code> - if the application does not have sufficient security rights</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="getInstantMillis(org.joda.time.ReadableInstant)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstantMillis</h4>
<pre>public static final long getInstantMillis(<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</pre>
<div class="block">Gets the millisecond instant from the specified instant object handling null.
<p>
If the instant object is <code>null</code>, the <a href="../../../org/joda/time/DateTimeUtils.html#currentTimeMillis()"><code>currentTimeMillis()</code></a>
will be returned. Otherwise, the millis from the object are returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>instant</code> - the instant to examine, null means now</dd>
<dt><span class="strong">Returns:</span></dt><dd>the time in milliseconds from 1970-01-01T00:00:00Z</dd></dl>
</li>
</ul>
<a name="getInstantChronology(org.joda.time.ReadableInstant)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstantChronology</h4>
<pre>public static final <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> getInstantChronology(<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</pre>
<div class="block">Gets the chronology from the specified instant object handling null.
<p>
If the instant object is <code>null</code>, or the instant's chronology is
<code>null</code>, <a href="../../../org/joda/time/chrono/ISOChronology.html#getInstance()"><code>ISOChronology.getInstance()</code></a> will be returned.
Otherwise, the chronology from the object is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>instant</code> - the instant to examine, null means ISO in the default zone</dd>
<dt><span class="strong">Returns:</span></dt><dd>the chronology, never null</dd></dl>
</li>
</ul>
<a name="getIntervalChronology(org.joda.time.ReadableInstant, org.joda.time.ReadableInstant)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIntervalChronology</h4>
<pre>public static final <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> getIntervalChronology(<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> start,
<a href="../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> end)</pre>
<div class="block">Gets the chronology from the specified instant based interval handling null.
<p>
The chronology is obtained from the start if that is not null, or from the
end if the start is null. The result is additionally checked, and if still
null then <a href="../../../org/joda/time/chrono/ISOChronology.html#getInstance()"><code>ISOChronology.getInstance()</code></a> will be returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>start</code> - the instant to examine and use as the primary source of the chronology</dd><dd><code>end</code> - the instant to examine and use as the secondary source of the chronology</dd>
<dt><span class="strong">Returns:</span></dt><dd>the chronology, never null</dd></dl>
</li>
</ul>
<a name="getIntervalChronology(org.joda.time.ReadableInterval)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIntervalChronology</h4>
<pre>public static final <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> getIntervalChronology(<a href="../../../org/joda/time/ReadableInterval.html" title="interface in org.joda.time">ReadableInterval</a> interval)</pre>
<div class="block">Gets the chronology from the specified interval object handling null.
<p>
If the interval object is <code>null</code>, or the interval's chronology is
<code>null</code>, <a href="../../../org/joda/time/chrono/ISOChronology.html#getInstance()"><code>ISOChronology.getInstance()</code></a> will be returned.
Otherwise, the chronology from the object is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>interval</code> - the interval to examine, null means ISO in the default zone</dd>
<dt><span class="strong">Returns:</span></dt><dd>the chronology, never null</dd></dl>
</li>
</ul>
<a name="getReadableInterval(org.joda.time.ReadableInterval)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadableInterval</h4>
<pre>public static final <a href="../../../org/joda/time/ReadableInterval.html" title="interface in org.joda.time">ReadableInterval</a> getReadableInterval(<a href="../../../org/joda/time/ReadableInterval.html" title="interface in org.joda.time">ReadableInterval</a> interval)</pre>
<div class="block">Gets the interval handling null.
<p>
If the interval is <code>null</code>, an interval representing now
to now in the <a href="../../../org/joda/time/chrono/ISOChronology.html#getInstance()"><code>ISOChronology</code></a>
will be returned. Otherwise, the interval specified is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>interval</code> - the interval to use, null means now to now</dd>
<dt><span class="strong">Returns:</span></dt><dd>the interval, never null</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="getChronology(org.joda.time.Chronology)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChronology</h4>
<pre>public static final <a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> getChronology(<a href="../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> chrono)</pre>
<div class="block">Gets the chronology handling null.
<p>
If the chronology is <code>null</code>, <a href="../../../org/joda/time/chrono/ISOChronology.html#getInstance()"><code>ISOChronology.getInstance()</code></a>
will be returned. Otherwise, the chronology is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>chrono</code> - the chronology to use, null means ISO in the default zone</dd>
<dt><span class="strong">Returns:</span></dt><dd>the chronology, never null</dd></dl>
</li>
</ul>
<a name="getZone(org.joda.time.DateTimeZone)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getZone</h4>
<pre>public static final <a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a> getZone(<a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a> zone)</pre>
<div class="block">Gets the zone handling null.
<p>
If the zone is <code>null</code>, <a href="../../../org/joda/time/DateTimeZone.html#getDefault()"><code>DateTimeZone.getDefault()</code></a>
will be returned. Otherwise, the zone specified is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>zone</code> - the time zone to use, null means the default zone</dd>
<dt><span class="strong">Returns:</span></dt><dd>the time zone, never null</dd></dl>
</li>
</ul>
<a name="getPeriodType(org.joda.time.PeriodType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPeriodType</h4>
<pre>public static final <a href="../../../org/joda/time/PeriodType.html" title="class in org.joda.time">PeriodType</a> getPeriodType(<a href="../../../org/joda/time/PeriodType.html" title="class in org.joda.time">PeriodType</a> type)</pre>
<div class="block">Gets the period type handling null.
<p>
If the zone is <code>null</code>, <a href="../../../org/joda/time/PeriodType.html#standard()"><code>PeriodType.standard()</code></a>
will be returned. Otherwise, the type specified is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - the time zone to use, null means the standard type</dd>
<dt><span class="strong">Returns:</span></dt><dd>the type to use, never null</dd></dl>
</li>
</ul>
<a name="getDurationMillis(org.joda.time.ReadableDuration)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDurationMillis</h4>
<pre>public static final long getDurationMillis(<a href="../../../org/joda/time/ReadableDuration.html" title="interface in org.joda.time">ReadableDuration</a> duration)</pre>
<div class="block">Gets the millisecond duration from the specified duration object handling null.
<p>
If the duration object is <code>null</code>, zero will be returned.
Otherwise, the millis from the object are returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>duration</code> - the duration to examine, null means zero</dd>
<dt><span class="strong">Returns:</span></dt><dd>the duration in milliseconds</dd></dl>
</li>
</ul>
<a name="isContiguous(org.joda.time.ReadablePartial)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isContiguous</h4>
<pre>public static final boolean isContiguous(<a href="../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</pre>
<div class="block">Checks whether the partial is contiguous.
<p>
A partial is contiguous if one field starts where another ends.
<p>
For example <code>LocalDate</code> is contiguous because DayOfMonth has
the same range (Month) as the unit of the next field (MonthOfYear), and
MonthOfYear has the same range (Year) as the unit of the next field (Year).
<p>
Similarly, <code>LocalTime</code> is contiguous, as it consists of
MillisOfSecond, SecondOfMinute, MinuteOfHour and HourOfDay (note how
the names of each field 'join up').
<p>
However, a Year/HourOfDay partial is not contiguous because the range
field Day is not equal to the next field Year.
Similarly, a DayOfWeek/DayOfMonth partial is not contiguous because
the range Month is not equal to the next field Day.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partial</code> - the partial to check</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the partial is contiguous</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if the partial is null</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="getDateFormatSymbols(java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDateFormatSymbols</h4>
<pre>public static final java.text.DateFormatSymbols getDateFormatSymbols(java.util.Locale locale)</pre>
<div class="block">Gets the <code>DateFormatSymbols</code> based on the given locale.
<p>
If JDK 6 or newer is being used, DateFormatSymbols.getInstance(locale) will
be used in order to allow the use of locales defined as extensions.
Otherwise, new DateFormatSymbols(locale) will be used.
See JDK 6 <code>DateFormatSymbols</code> for further information.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>locale</code> - the <code>Locale</code> used to get the correct <code>DateFormatSymbols</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the symbols</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="getDefaultTimeZoneNames()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultTimeZoneNames</h4>
<pre>public static final java.util.Map<java.lang.String,<a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a>> getDefaultTimeZoneNames()</pre>
<div class="block">Gets the default map of time zone names.
<p>
This can be changed by <a href="../../../org/joda/time/DateTimeUtils.html#setDefaultTimeZoneNames(java.util.Map)"><code>setDefaultTimeZoneNames(java.util.Map<java.lang.String, org.joda.time.DateTimeZone>)</code></a>.
<p>
The default set of short time zone names is as follows:
<ul>
<li>UT - UTC
<li>UTC - UTC
<li>GMT - UTC
<li>EST - America/New_York
<li>EDT - America/New_York
<li>CST - America/Chicago
<li>CDT - America/Chicago
<li>MST - America/Denver
<li>MDT - America/Denver
<li>PST - America/Los_Angeles
<li>PDT - America/Los_Angeles
</ul></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the unmodifiable map of abbreviations to zones, not null</dd><dt><span class="strong">Since:</span></dt>
<dd>2.2</dd></dl>
</li>
</ul>
<a name="setDefaultTimeZoneNames(java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDefaultTimeZoneNames</h4>
<pre>public static final void setDefaultTimeZoneNames(java.util.Map<java.lang.String,<a href="../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a>> names)</pre>
<div class="block">Sets the default map of time zone names.
<p>
The map is copied before storage.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>names</code> - the map of abbreviations to zones, not null</dd><dt><span class="strong">Since:</span></dt>
<dd>2.2</dd></dl>
</li>
</ul>
<a name="toJulianDay(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toJulianDay</h4>
<pre>public static final double toJulianDay(long epochMillis)</pre>
<div class="block">Calculates the astronomical Julian Day for an instant.
<p>
The <a href="http://en.wikipedia.org/wiki/Julian_day">Julian day</a> is a well-known
system of time measurement for scientific use by the astronomy community.
It expresses the interval of time in days and fractions of a day since
January 1, 4713 BC (Julian) Greenwich noon.
<p>
Each day starts at midday (not midnight) and time is expressed as a fraction.
Thus the fraction 0.25 is 18:00. equal to one quarter of the day from midday to midday.
<p>
Note that this method has nothing to do with the day-of-year.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>epochMillis</code> - the epoch millis from 1970-01-01Z</dd>
<dt><span class="strong">Returns:</span></dt><dd>the astronomical Julian Day represented by the specified instant</dd><dt><span class="strong">Since:</span></dt>
<dd>2.2</dd></dl>
</li>
</ul>
<a name="toJulianDayNumber(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toJulianDayNumber</h4>
<pre>public static final long toJulianDayNumber(long epochMillis)</pre>
<div class="block">Calculates the astronomical Julian Day Number for an instant.
<p>
The <a href="../../../org/joda/time/DateTimeUtils.html#toJulianDay(long)"><code>toJulianDay(long)</code></a> method calculates the astronomical Julian Day
with a fraction based on days starting at midday.
This method calculates the variant where days start at midnight.
JDN 0 is used for the date equivalent to Monday January 1, 4713 BC (Julian).
Thus these days start 12 hours before those of the fractional Julian Day.
<p>
Note that this method has nothing to do with the day-of-year.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>epochMillis</code> - the epoch millis from 1970-01-01Z</dd>
<dt><span class="strong">Returns:</span></dt><dd>the astronomical Julian Day represented by the specified instant</dd><dt><span class="strong">Since:</span></dt>
<dd>2.2</dd></dl>
</li>
</ul>
<a name="fromJulianDay(double)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>fromJulianDay</h4>
<pre>public static final long fromJulianDay(double julianDay)</pre>
<div class="block">Creates a date-time from a Julian Day.
<p>
Returns the <code>DateTime</code> object equal to the specified Julian Day.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>julianDay</code> - the Julian Day</dd>
<dt><span class="strong">Returns:</span></dt><dd>the epoch millis from 1970-01-01Z</dd><dt><span class="strong">Since:</span></dt>
<dd>2.2</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/DateTimeUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/joda/time/DateTimeFieldType.html" title="class in org.joda.time"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/joda/time/DateTimeUtils.MillisProvider.html" title="interface in org.joda.time"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/joda/time/DateTimeUtils.html" target="_top">Frames</a></li>
<li><a href="DateTimeUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li><a href="#nested_class_summary">Nested</a> | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2002-2013 <a href="http://www.joda.org">Joda.org</a>. All Rights Reserved.</small></p>
</body>
</html>
|