/usr/share/doc/libjoda-time-java/api/org/joda/time/format/DateTimeFormatter.html is in libjoda-time-java-doc 2.4-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 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 | <!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>DateTimeFormatter (Joda-Time 2.4 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="DateTimeFormatter (Joda-Time 2.4 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/DateTimeFormatter.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/format/DateTimeFormat.html" title="class in org.joda.time.format"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatterBuilder.html" title="class in org.joda.time.format"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/joda/time/format/DateTimeFormatter.html" target="_top">Frames</a></li>
<li><a href="DateTimeFormatter.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>Nested | </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.format</div>
<h2 title="Class DateTimeFormatter" class="title">Class DateTimeFormatter</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.joda.time.format.DateTimeFormatter</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">DateTimeFormatter</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Controls the printing and parsing of a datetime to and from a string.
<p>
This class is the main API for printing and parsing used by most applications.
Instances of this class are created via one of three factory classes:
<ul>
<li><a href="../../../../org/joda/time/format/DateTimeFormat.html" title="class in org.joda.time.format"><code>DateTimeFormat</code></a> - formats by pattern and style</li>
<li><a href="../../../../org/joda/time/format/ISODateTimeFormat.html" title="class in org.joda.time.format"><code>ISODateTimeFormat</code></a> - ISO8601 formats</li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatterBuilder.html" title="class in org.joda.time.format"><code>DateTimeFormatterBuilder</code></a> - complex formats created via method calls</li>
</ul>
<p>
An instance of this class holds a reference internally to one printer and
one parser. It is possible that one of these may be null, in which case the
formatter cannot print/parse. This can be checked via the <a href="../../../../org/joda/time/format/DateTimeFormatter.html#isPrinter()"><code>isPrinter()</code></a>
and <a href="../../../../org/joda/time/format/DateTimeFormatter.html#isParser()"><code>isParser()</code></a> methods.
<p>
The underlying printer/parser can be altered to behave exactly as required
by using one of the decorator modifiers:
<ul>
<li><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withLocale(java.util.Locale)"><code>withLocale(Locale)</code></a> - returns a new formatter that uses the specified locale</li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withZone(org.joda.time.DateTimeZone)"><code>withZone(DateTimeZone)</code></a> - returns a new formatter that uses the specified time zone</li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withChronology(org.joda.time.Chronology)"><code>withChronology(Chronology)</code></a> - returns a new formatter that uses the specified chronology</li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withOffsetParsed()"><code>withOffsetParsed()</code></a> - returns a new formatter that returns the parsed time zone offset</li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withPivotYear(int)"><code>withPivotYear(int)</code></a> - returns a new formatter with the specified pivot year</li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withDefaultYear(int)"><code>withDefaultYear(int)</code></a> - returns a new formatter with the specified default year</li>
</ul>
Each of these returns a new formatter (instances of this class are immutable).
<p>
The main methods of the class are the <code>printXxx</code> and
<code>parseXxx</code> methods. These are used as follows:
<pre>
// print using the defaults (default locale, chronology/zone of the datetime)
String dateStr = formatter.print(dt);
// print using the French locale
String dateStr = formatter.withLocale(Locale.FRENCH).print(dt);
// print using the UTC zone
String dateStr = formatter.withZone(DateTimeZone.UTC).print(dt);
// parse using the Paris zone
DateTime date = formatter.withZone(DateTimeZone.forID("Europe/Paris")).parseDateTime(str);
</pre>
<p>
Parsing builds up the resultant instant by 'setting' the value of each parsed field
from largest to smallest onto an initial instant, typically 1970-01-01T00:00Z.
This design means that day-of-month is set before day-of-week.
As such, if both the day-of-month and day-of-week are parsed, and the day-of-week
is incorrect, then the day-of-week overrides the day-of-month.
This has a side effect if the input is not consistent.</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">
<!-- ======== 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="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#DateTimeFormatter(org.joda.time.format.DateTimePrinter,%20org.joda.time.format.DateTimeParser)">DateTimeFormatter</a></strong>(<a href="../../../../org/joda/time/format/DateTimePrinter.html" title="interface in org.joda.time.format">DateTimePrinter</a> printer,
<a href="../../../../org/joda/time/format/DateTimeParser.html" title="interface in org.joda.time.format">DateTimeParser</a> parser)</code>
<div class="block">Creates a new formatter, however you will normally use the factory
or the builder.</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><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/format/DateTimeFormatter.html#getChronolgy()">getChronolgy</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>
<div class="block"><i>Use the method with the correct spelling</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><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/format/DateTimeFormatter.html#getChronology()">getChronology</a></strong>()</code>
<div class="block">Gets the chronology to use as an override.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#getDefaultYear()">getDefaultYear</a></strong>()</code>
<div class="block">Gets the default year for parsing months and days.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#getLocale()">getLocale</a></strong>()</code>
<div class="block">Gets the locale that will be used for printing and parsing.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeParser.html" title="interface in org.joda.time.format">DateTimeParser</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#getParser()">getParser</a></strong>()</code>
<div class="block">Gets the internal parser object that performs the real parsing work.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#getPivotYear()">getPivotYear</a></strong>()</code>
<div class="block">Gets the pivot year to use as an override.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimePrinter.html" title="interface in org.joda.time.format">DateTimePrinter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#getPrinter()">getPrinter</a></strong>()</code>
<div class="block">Gets the internal printer object that performs the real printing work.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><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/format/DateTimeFormatter.html#getZone()">getZone</a></strong>()</code>
<div class="block">Gets the zone to use as an override.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#isOffsetParsed()">isOffsetParsed</a></strong>()</code>
<div class="block">Checks whether the offset from the string is used as the zone of
the parsed datetime.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#isParser()">isParser</a></strong>()</code>
<div class="block">Is this formatter capable of parsing.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#isPrinter()">isPrinter</a></strong>()</code>
<div class="block">Is this formatter capable of printing.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/DateTime.html" title="class in org.joda.time">DateTime</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseDateTime(java.lang.String)">parseDateTime</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code>
<div class="block">Parses a date-time from the given text, returning a new DateTime.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseInto(org.joda.time.ReadWritableInstant,%20java.lang.String,%20int)">parseInto</a></strong>(<a href="../../../../org/joda/time/ReadWritableInstant.html" title="interface in org.joda.time">ReadWritableInstant</a> instant,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text,
int position)</code>
<div class="block">Parses a datetime from the given text, at the given position, saving the
result into the fields of the given ReadWritableInstant.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/LocalDate.html" title="class in org.joda.time">LocalDate</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseLocalDate(java.lang.String)">parseLocalDate</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code>
<div class="block">Parses only the local date from the given text, returning a new LocalDate.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/LocalDateTime.html" title="class in org.joda.time">LocalDateTime</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseLocalDateTime(java.lang.String)">parseLocalDateTime</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code>
<div class="block">Parses only the local date-time from the given text, returning a new LocalDateTime.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/LocalTime.html" title="class in org.joda.time">LocalTime</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseLocalTime(java.lang.String)">parseLocalTime</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code>
<div class="block">Parses only the local time from the given text, returning a new LocalTime.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseMillis(java.lang.String)">parseMillis</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code>
<div class="block">Parses a datetime from the given text, returning the number of
milliseconds since the epoch, 1970-01-01T00:00:00Z.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/MutableDateTime.html" title="class in org.joda.time">MutableDateTime</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseMutableDateTime(java.lang.String)">parseMutableDateTime</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</code>
<div class="block">Parses a date-time from the given text, returning a new MutableDateTime.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#print(long)">print</a></strong>(long instant)</code>
<div class="block">Prints a millisecond instant to a String.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#print(org.joda.time.ReadableInstant)">print</a></strong>(<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</code>
<div class="block">Prints a ReadableInstant to a String.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#print(org.joda.time.ReadablePartial)">print</a></strong>(<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</code>
<div class="block">Prints a ReadablePartial to a new String.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.lang.Appendable,%20long)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> appendable,
long instant)</code>
<div class="block">Prints an instant from milliseconds since 1970-01-01T00:00:00Z,
using ISO chronology in the default DateTimeZone.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.lang.Appendable,%20org.joda.time.ReadableInstant)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> appendable,
<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</code>
<div class="block">Prints a ReadableInstant, using the chronology supplied by the instant.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.lang.Appendable,%20org.joda.time.ReadablePartial)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> appendable,
<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</code>
<div class="block">Prints a ReadablePartial.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.lang.StringBuffer,%20long)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a> buf,
long instant)</code>
<div class="block">Prints an instant from milliseconds since 1970-01-01T00:00:00Z,
using ISO chronology in the default DateTimeZone.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.lang.StringBuffer,%20org.joda.time.ReadableInstant)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a> buf,
<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</code>
<div class="block">Prints a ReadableInstant, using the chronology supplied by the instant.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.lang.StringBuffer,%20org.joda.time.ReadablePartial)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a> buf,
<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</code>
<div class="block">Prints a ReadablePartial.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.io.Writer,%20long)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out,
long instant)</code>
<div class="block">Prints an instant from milliseconds since 1970-01-01T00:00:00Z,
using ISO chronology in the default DateTimeZone.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.io.Writer,%20org.joda.time.ReadableInstant)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out,
<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</code>
<div class="block">Prints a ReadableInstant, using the chronology supplied by the instant.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#printTo(java.io.Writer,%20org.joda.time.ReadablePartial)">printTo</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out,
<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</code>
<div class="block">Prints a ReadablePartial.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withChronology(org.joda.time.Chronology)">withChronology</a></strong>(<a href="../../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> chrono)</code>
<div class="block">Returns a new formatter that will use the specified chronology in
preference to that of the printed object, or ISO on a parse.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withDefaultYear(int)">withDefaultYear</a></strong>(int defaultYear)</code>
<div class="block">Returns a new formatter that will use the specified default year.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withLocale(java.util.Locale)">withLocale</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale)</code>
<div class="block">Returns a new formatter with a different locale that will be used
for printing and parsing.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withOffsetParsed()">withOffsetParsed</a></strong>()</code>
<div class="block">Returns a new formatter that will create a datetime with a time zone
equal to that of the offset of the parsed string.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withPivotYear(int)">withPivotYear</a></strong>(int pivotYear)</code>
<div class="block">Returns a new formatter that will use the specified pivot year for two
digit year parsing in preference to that stored in the parser.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withPivotYear(java.lang.Integer)">withPivotYear</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> pivotYear)</code>
<div class="block">Returns a new formatter that will use the specified pivot year for two
digit year parsing in preference to that stored in the parser.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withZone(org.joda.time.DateTimeZone)">withZone</a></strong>(<a href="../../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a> zone)</code>
<div class="block">Returns a new formatter that will use the specified zone in preference
to the zone of the printed object, or default zone on a parse.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/joda/time/format/DateTimeFormatter.html#withZoneUTC()">withZoneUTC</a></strong>()</code>
<div class="block">Returns a new formatter that will use the UTC zone in preference
to the zone of the printed object, or default zone on a parse.</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.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></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="DateTimeFormatter(org.joda.time.format.DateTimePrinter, org.joda.time.format.DateTimeParser)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DateTimeFormatter</h4>
<pre>public DateTimeFormatter(<a href="../../../../org/joda/time/format/DateTimePrinter.html" title="interface in org.joda.time.format">DateTimePrinter</a> printer,
<a href="../../../../org/joda/time/format/DateTimeParser.html" title="interface in org.joda.time.format">DateTimeParser</a> parser)</pre>
<div class="block">Creates a new formatter, however you will normally use the factory
or the builder.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>printer</code> - the internal printer, null if cannot print</dd><dd><code>parser</code> - the internal parser, null if cannot parse</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isPrinter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPrinter</h4>
<pre>public boolean isPrinter()</pre>
<div class="block">Is this formatter capable of printing.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if this is a printer</dd></dl>
</li>
</ul>
<a name="getPrinter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrinter</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimePrinter.html" title="interface in org.joda.time.format">DateTimePrinter</a> getPrinter()</pre>
<div class="block">Gets the internal printer object that performs the real printing work.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the internal printer; is null if printing not supported</dd></dl>
</li>
</ul>
<a name="isParser()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isParser</h4>
<pre>public boolean isParser()</pre>
<div class="block">Is this formatter capable of parsing.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if this is a parser</dd></dl>
</li>
</ul>
<a name="getParser()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParser</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeParser.html" title="interface in org.joda.time.format">DateTimeParser</a> getParser()</pre>
<div class="block">Gets the internal parser object that performs the real parsing work.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the internal parser; is null if parsing not supported</dd></dl>
</li>
</ul>
<a name="withLocale(java.util.Locale)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withLocale</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withLocale(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> locale)</pre>
<div class="block">Returns a new formatter with a different locale that will be used
for printing and parsing.
<p>
A DateTimeFormatter is immutable, so a new instance is returned,
and the original is unaltered and still usable.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>locale</code> - the locale to use; if null, formatter uses default locale
at invocation time</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new formatter</dd></dl>
</li>
</ul>
<a name="getLocale()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocale</h4>
<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html?is-external=true" title="class or interface in java.util">Locale</a> getLocale()</pre>
<div class="block">Gets the locale that will be used for printing and parsing.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the locale to use; if null, formatter uses default locale at
invocation time</dd></dl>
</li>
</ul>
<a name="withOffsetParsed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withOffsetParsed</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withOffsetParsed()</pre>
<div class="block">Returns a new formatter that will create a datetime with a time zone
equal to that of the offset of the parsed string.
<p>
After calling this method, a string '2004-06-09T10:20:30-08:00' will
create a datetime with a zone of -08:00 (a fixed zone, with no daylight
savings rules). If the parsed string represents a local time (no zone
offset) the parsed datetime will be in the default zone.
<p>
Calling this method sets the override zone to null.
Calling the override zone method sets this flag off.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the new formatter</dd></dl>
</li>
</ul>
<a name="isOffsetParsed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOffsetParsed</h4>
<pre>public boolean isOffsetParsed()</pre>
<div class="block">Checks whether the offset from the string is used as the zone of
the parsed datetime.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if the offset from the string is used as the zone</dd></dl>
</li>
</ul>
<a name="withChronology(org.joda.time.Chronology)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withChronology</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withChronology(<a href="../../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> chrono)</pre>
<div class="block">Returns a new formatter that will use the specified chronology in
preference to that of the printed object, or ISO on a parse.
<p>
When printing, this chronology will be used in preference to the chronology
from the datetime that would otherwise be used.
<p>
When parsing, this chronology will be set on the parsed datetime.
<p>
A null chronology means no-override.
If both an override chronology and an override zone are set, the
override zone will take precedence over the zone in the chronology.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>chrono</code> - the chronology to use as an override</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new formatter</dd></dl>
</li>
</ul>
<a name="getChronology()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChronology</h4>
<pre>public <a href="../../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> getChronology()</pre>
<div class="block">Gets the chronology to use as an override.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the chronology to use as an override</dd></dl>
</li>
</ul>
<a name="getChronolgy()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChronolgy</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public <a href="../../../../org/joda/time/Chronology.html" title="class in org.joda.time">Chronology</a> getChronolgy()</pre>
<div class="block"><span class="strong">Deprecated.</span> <i>Use the method with the correct spelling</i></div>
<div class="block">Gets the chronology to use as an override.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the chronology to use as an override</dd></dl>
</li>
</ul>
<a name="withZoneUTC()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withZoneUTC</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withZoneUTC()</pre>
<div class="block">Returns a new formatter that will use the UTC zone in preference
to the zone of the printed object, or default zone on a parse.
<p>
When printing, UTC will be used in preference to the zone
from the datetime that would otherwise be used.
<p>
When parsing, UTC will be set on the parsed datetime.
<p>
If both an override chronology and an override zone are set, the
override zone will take precedence over the zone in the chronology.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the new formatter, never null</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="withZone(org.joda.time.DateTimeZone)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withZone</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withZone(<a href="../../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a> zone)</pre>
<div class="block">Returns a new formatter that will use the specified zone in preference
to the zone of the printed object, or default zone on a parse.
<p>
When printing, this zone will be used in preference to the zone
from the datetime that would otherwise be used.
<p>
When parsing, this zone will be set on the parsed datetime.
<p>
A null zone means of no-override.
If both an override chronology and an override zone are set, the
override zone will take precedence over the zone in the chronology.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>zone</code> - the zone to use as an override</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new formatter</dd></dl>
</li>
</ul>
<a name="getZone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getZone</h4>
<pre>public <a href="../../../../org/joda/time/DateTimeZone.html" title="class in org.joda.time">DateTimeZone</a> getZone()</pre>
<div class="block">Gets the zone to use as an override.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the zone to use as an override</dd></dl>
</li>
</ul>
<a name="withPivotYear(java.lang.Integer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withPivotYear</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withPivotYear(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> pivotYear)</pre>
<div class="block">Returns a new formatter that will use the specified pivot year for two
digit year parsing in preference to that stored in the parser.
<p>
This setting is useful for changing the pivot year of formats built
using a pattern - <a href="../../../../org/joda/time/format/DateTimeFormat.html#forPattern(java.lang.String)"><code>DateTimeFormat.forPattern(String)</code></a>.
<p>
When parsing, this pivot year is used. Null means no-override.
There is no effect when printing.
<p>
The pivot year enables a two digit year to be converted to a four
digit year. The pivot represents the year in the middle of the
supported range of years. Thus the full range of years that will
be built is <code>(pivot - 50) .. (pivot + 49)</code>.
<pre>
pivot supported range 00 is 20 is 40 is 60 is 80 is
---------------------------------------------------------------
1950 1900..1999 1900 1920 1940 1960 1980
1975 1925..2024 2000 2020 1940 1960 1980
2000 1950..2049 2000 2020 2040 1960 1980
2025 1975..2074 2000 2020 2040 2060 1980
2050 2000..2099 2000 2020 2040 2060 2080
</pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pivotYear</code> - the pivot year to use as an override when parsing</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new formatter</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="withPivotYear(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withPivotYear</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withPivotYear(int pivotYear)</pre>
<div class="block">Returns a new formatter that will use the specified pivot year for two
digit year parsing in preference to that stored in the parser.
<p>
This setting is useful for changing the pivot year of formats built
using a pattern - <a href="../../../../org/joda/time/format/DateTimeFormat.html#forPattern(java.lang.String)"><code>DateTimeFormat.forPattern(String)</code></a>.
<p>
When parsing, this pivot year is used.
There is no effect when printing.
<p>
The pivot year enables a two digit year to be converted to a four
digit year. The pivot represents the year in the middle of the
supported range of years. Thus the full range of years that will
be built is <code>(pivot - 50) .. (pivot + 49)</code>.
<pre>
pivot supported range 00 is 20 is 40 is 60 is 80 is
---------------------------------------------------------------
1950 1900..1999 1900 1920 1940 1960 1980
1975 1925..2024 2000 2020 1940 1960 1980
2000 1950..2049 2000 2020 2040 1960 1980
2025 1975..2074 2000 2020 2040 2060 1980
2050 2000..2099 2000 2020 2040 2060 2080
</pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pivotYear</code> - the pivot year to use as an override when parsing</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new formatter</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="getPivotYear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPivotYear</h4>
<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> getPivotYear()</pre>
<div class="block">Gets the pivot year to use as an override.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the pivot year to use as an override</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="withDefaultYear(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withDefaultYear</h4>
<pre>public <a href="../../../../org/joda/time/format/DateTimeFormatter.html" title="class in org.joda.time.format">DateTimeFormatter</a> withDefaultYear(int defaultYear)</pre>
<div class="block">Returns a new formatter that will use the specified default year.
<p>
The default year is used when parsing in the case where there is a
month or a day but not a year. Specifically, it is used if there is
a field parsed with a duration between the length of a month and the
length of a day inclusive.
<p>
This value is typically used to move the year from 1970 to a leap year
to enable February 29th to be parsed.
Unless customised, the year 2000 is used.
<p>
This setting has no effect when printing.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>defaultYear</code> - the default year to use</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new formatter, not null</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="getDefaultYear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultYear</h4>
<pre>public int getDefaultYear()</pre>
<div class="block">Gets the default year for parsing months and days.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the default year for parsing months and days</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="printTo(java.lang.StringBuffer, org.joda.time.ReadableInstant)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a> buf,
<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</pre>
<div class="block">Prints a ReadableInstant, using the chronology supplied by the instant.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - the destination to format to, not null</dd><dd><code>instant</code> - instant to format, null means now</dd></dl>
</li>
</ul>
<a name="printTo(java.io.Writer, org.joda.time.ReadableInstant)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out,
<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Prints a ReadableInstant, using the chronology supplied by the instant.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - the destination to format to, not null</dd><dd><code>instant</code> - instant to format, null means now</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="printTo(java.lang.Appendable, org.joda.time.ReadableInstant)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> appendable,
<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Prints a ReadableInstant, using the chronology supplied by the instant.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>appendable</code> - the destination to format to, not null</dd><dd><code>instant</code> - instant to format, null means now</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="printTo(java.lang.StringBuffer, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a> buf,
long instant)</pre>
<div class="block">Prints an instant from milliseconds since 1970-01-01T00:00:00Z,
using ISO chronology in the default DateTimeZone.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - the destination to format to, not null</dd><dd><code>instant</code> - millis since 1970-01-01T00:00:00Z</dd></dl>
</li>
</ul>
<a name="printTo(java.io.Writer, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out,
long instant)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Prints an instant from milliseconds since 1970-01-01T00:00:00Z,
using ISO chronology in the default DateTimeZone.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - the destination to format to, not null</dd><dd><code>instant</code> - millis since 1970-01-01T00:00:00Z</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="printTo(java.lang.Appendable, long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> appendable,
long instant)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Prints an instant from milliseconds since 1970-01-01T00:00:00Z,
using ISO chronology in the default DateTimeZone.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>appendable</code> - the destination to format to, not null</dd><dd><code>instant</code> - millis since 1970-01-01T00:00:00Z</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="printTo(java.lang.StringBuffer, org.joda.time.ReadablePartial)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/StringBuffer.html?is-external=true" title="class or interface in java.lang">StringBuffer</a> buf,
<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</pre>
<div class="block">Prints a ReadablePartial.
<p>
Neither the override chronology nor the override zone are used
by this method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - the destination to format to, not null</dd><dd><code>partial</code> - partial to format</dd></dl>
</li>
</ul>
<a name="printTo(java.io.Writer, org.joda.time.ReadablePartial)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out,
<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Prints a ReadablePartial.
<p>
Neither the override chronology nor the override zone are used
by this method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - the destination to format to, not null</dd><dd><code>partial</code> - partial to format</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="printTo(java.lang.Appendable, org.joda.time.ReadablePartial)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>printTo</h4>
<pre>public void printTo(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Appendable.html?is-external=true" title="class or interface in java.lang">Appendable</a> appendable,
<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Prints a ReadablePartial.
<p>
Neither the override chronology nor the override zone are used
by this method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>appendable</code> - the destination to format to, not null</dd><dd><code>partial</code> - partial to format</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="print(org.joda.time.ReadableInstant)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>print</h4>
<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> print(<a href="../../../../org/joda/time/ReadableInstant.html" title="interface in org.joda.time">ReadableInstant</a> instant)</pre>
<div class="block">Prints a ReadableInstant to a String.
<p>
This method will use the override zone and the override chronology if
they are set. Otherwise it will use the chronology and zone of the instant.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>instant</code> - instant to format, null means now</dd>
<dt><span class="strong">Returns:</span></dt><dd>the printed result</dd></dl>
</li>
</ul>
<a name="print(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>print</h4>
<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> print(long instant)</pre>
<div class="block">Prints a millisecond instant to a String.
<p>
This method will use the override zone and the override chronology if
they are set. Otherwise it will use the ISO chronology and default zone.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>instant</code> - millis since 1970-01-01T00:00:00Z</dd>
<dt><span class="strong">Returns:</span></dt><dd>the printed result</dd></dl>
</li>
</ul>
<a name="print(org.joda.time.ReadablePartial)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>print</h4>
<pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> print(<a href="../../../../org/joda/time/ReadablePartial.html" title="interface in org.joda.time">ReadablePartial</a> partial)</pre>
<div class="block">Prints a ReadablePartial to a new String.
<p>
Neither the override chronology nor the override zone are used
by this method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>partial</code> - partial to format</dd>
<dt><span class="strong">Returns:</span></dt><dd>the printed result</dd></dl>
</li>
</ul>
<a name="parseInto(org.joda.time.ReadWritableInstant, java.lang.String, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseInto</h4>
<pre>public int parseInto(<a href="../../../../org/joda/time/ReadWritableInstant.html" title="interface in org.joda.time">ReadWritableInstant</a> instant,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text,
int position)</pre>
<div class="block">Parses a datetime from the given text, at the given position, saving the
result into the fields of the given ReadWritableInstant. If the parse
succeeds, the return value is the new text position. Note that the parse
may succeed without fully reading the text and in this case those fields
that were read will be set.
<p>
Only those fields present in the string will be changed in the specified
instant. All other fields will remain unaltered. Thus if the string only
contains a year and a month, then the day and time will be retained from
the input instant. If this is not the behaviour you want, then reset the
fields before calling this method, or use <a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseDateTime(java.lang.String)"><code>parseDateTime(String)</code></a>
or <a href="../../../../org/joda/time/format/DateTimeFormatter.html#parseMutableDateTime(java.lang.String)"><code>parseMutableDateTime(String)</code></a>.
<p>
If it fails, the return value is negative, but the instant may still be
modified. To determine the position where the parse failed, apply the
one's complement operator (~) on the return value.
<p>
This parse method ignores the <a href="../../../../org/joda/time/format/DateTimeFormatter.html#getDefaultYear()"><code>default year</code></a> and
parses using the year from the supplied instant based on the chronology
and time-zone of the supplied instant.
<p>
The parse will use the chronology of the instant.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>instant</code> - an instant that will be modified, not null</dd><dd><code>text</code> - the text to parse</dd><dd><code>position</code> - position to start parsing from</dd>
<dt><span class="strong">Returns:</span></dt><dd>new position, negative value means parse failed -
apply complement operator (~) to get position of failure</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if parsing is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the instant is null</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if any field is out of range</dd></dl>
</li>
</ul>
<a name="parseMillis(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseMillis</h4>
<pre>public long parseMillis(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre>
<div class="block">Parses a datetime from the given text, returning the number of
milliseconds since the epoch, 1970-01-01T00:00:00Z.
<p>
The parse will use the ISO chronology, and the default time zone.
If the text contains a time zone string then that will be taken into account.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text to parse, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>parsed value expressed in milliseconds since the epoch</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if parsing is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the text to parse is invalid</dd></dl>
</li>
</ul>
<a name="parseLocalDate(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseLocalDate</h4>
<pre>public <a href="../../../../org/joda/time/LocalDate.html" title="class in org.joda.time">LocalDate</a> parseLocalDate(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre>
<div class="block">Parses only the local date from the given text, returning a new LocalDate.
<p>
This will parse the text fully according to the formatter, using the UTC zone.
Once parsed, only the local date will be used.
This means that any parsed time, time-zone or offset field is completely ignored.
It also means that the zone and offset-parsed settings are ignored.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text to parse, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date, never null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if parsing is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the text to parse is invalid</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="parseLocalTime(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseLocalTime</h4>
<pre>public <a href="../../../../org/joda/time/LocalTime.html" title="class in org.joda.time">LocalTime</a> parseLocalTime(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre>
<div class="block">Parses only the local time from the given text, returning a new LocalTime.
<p>
This will parse the text fully according to the formatter, using the UTC zone.
Once parsed, only the local time will be used.
This means that any parsed date, time-zone or offset field is completely ignored.
It also means that the zone and offset-parsed settings are ignored.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text to parse, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed time, never null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if parsing is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the text to parse is invalid</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="parseLocalDateTime(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseLocalDateTime</h4>
<pre>public <a href="../../../../org/joda/time/LocalDateTime.html" title="class in org.joda.time">LocalDateTime</a> parseLocalDateTime(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre>
<div class="block">Parses only the local date-time from the given text, returning a new LocalDateTime.
<p>
This will parse the text fully according to the formatter, using the UTC zone.
Once parsed, only the local date-time will be used.
This means that any parsed time-zone or offset field is completely ignored.
It also means that the zone and offset-parsed settings are ignored.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text to parse, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date-time, never null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if parsing is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the text to parse is invalid</dd><dt><span class="strong">Since:</span></dt>
<dd>2.0</dd></dl>
</li>
</ul>
<a name="parseDateTime(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>parseDateTime</h4>
<pre>public <a href="../../../../org/joda/time/DateTime.html" title="class in org.joda.time">DateTime</a> parseDateTime(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre>
<div class="block">Parses a date-time from the given text, returning a new DateTime.
<p>
The parse will use the zone and chronology specified on this formatter.
<p>
If the text contains a time zone string then that will be taken into
account in adjusting the time of day as follows.
If the <a href="../../../../org/joda/time/format/DateTimeFormatter.html#withOffsetParsed()"><code>withOffsetParsed()</code></a> has been called, then the resulting
DateTime will have a fixed offset based on the parsed time zone.
Otherwise the resulting DateTime will have the zone of this formatter,
but the parsed zone may have caused the time to be adjusted.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text to parse, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date-time, never null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if parsing is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the text to parse is invalid</dd></dl>
</li>
</ul>
<a name="parseMutableDateTime(java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>parseMutableDateTime</h4>
<pre>public <a href="../../../../org/joda/time/MutableDateTime.html" title="class in org.joda.time">MutableDateTime</a> parseMutableDateTime(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text)</pre>
<div class="block">Parses a date-time from the given text, returning a new MutableDateTime.
<p>
The parse will use the zone and chronology specified on this formatter.
<p>
If the text contains a time zone string then that will be taken into
account in adjusting the time of day as follows.
If the <a href="../../../../org/joda/time/format/DateTimeFormatter.html#withOffsetParsed()"><code>withOffsetParsed()</code></a> has been called, then the resulting
DateTime will have a fixed offset based on the parsed time zone.
Otherwise the resulting DateTime will have the zone of this formatter,
but the parsed zone may have caused the time to be adjusted.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>text</code> - the text to parse, not null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the parsed date-time, never null</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</a></code> - if parsing is not supported</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the text to parse is invalid</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/DateTimeFormatter.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/format/DateTimeFormat.html" title="class in org.joda.time.format"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/joda/time/format/DateTimeFormatterBuilder.html" title="class in org.joda.time.format"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/joda/time/format/DateTimeFormatter.html" target="_top">Frames</a></li>
<li><a href="DateTimeFormatter.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>Nested | </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–2014 <a href="http://www.joda.org">Joda.org</a>. All rights reserved.</small></p>
</body>
</html>
|