|
| 1 | +<?xml version="1.0" encoding="ISO-8859-1"?> |
| 2 | + |
| 3 | +<document> |
| 4 | + <properties> |
| 5 | + <title>Java date and time API - Upgrade from 2.2 to 2.3</title> |
| 6 | + <author>Stephen Colebourne</author> |
| 7 | + </properties> |
| 8 | + |
| 9 | +<body> |
| 10 | + |
| 11 | +<section name="Upgrade"> |
| 12 | +<p> |
| 13 | +These are the release notes and advice for upgrading Joda-Time from version 2.3 to version 2.4. |
| 14 | +<source> |
| 15 | +Joda-Time version 2.4 |
| 16 | +--------------------- |
| 17 | + |
| 18 | +Joda-Time is a date and time handling library that seeks to replace the JDK |
| 19 | +Date and Calendar classes. |
| 20 | + |
| 21 | +This release contains enhancements, bug fixes and a time zone update. |
| 22 | +The release runs on JDK 5 or later. |
| 23 | + |
| 24 | +Joda-Time is licensed under the business-friendly Apache License Version 2. |
| 25 | +This is the same license as all of Apache, plus other open source projects such as Spring. |
| 26 | +The intent is to make the code available to the Java community with the minimum |
| 27 | +of restrictions. If the license causes you problems please contact the mailing list. |
| 28 | + |
| 29 | +** Please also check out our related projects ** |
| 30 | +** http://www.joda.org/joda-time/related.html ** |
| 31 | + |
| 32 | + |
| 33 | +Enhancements since 2.3 |
| 34 | +---------------------- |
| 35 | +- Duration.multipliedBy(), .dividedBy(), .negated() |
| 36 | + Additional methods on Duration |
| 37 | + |
| 38 | +- LocalDate.hashCode() |
| 39 | + Remove unnecessary volatile on instance variable [#68] |
| 40 | + LocalDate hash code meets criteria of the racy single-check idiom |
| 41 | + |
| 42 | +- DateTimeParserBucket |
| 43 | + Allow bucket to be re-used on a single thread [#111] |
| 44 | + Potential for performance improvements due to lower garbage churn |
| 45 | + Improvement only of interest to applications willing to write specialist code |
| 46 | + |
| 47 | +- Support CharSequence throughout parsing |
| 48 | + Ensure that CharSequence can be used in parsing [#111] |
| 49 | + This can only be accessed by creating a mutable DateTimeParserBucket |
| 50 | + The bucket is a low-level construct for advanced use cases |
| 51 | + Potential for performance improvements due to lower garbage churn |
| 52 | + No API change |
| 53 | + |
| 54 | +- Support Appendable throughout printing |
| 55 | + Ensure that Appendable can be used efficiently in printing [#120, #121, #122] |
| 56 | + No API change |
| 57 | + |
| 58 | +- Increased performance of chronology lookup [#126,#105] |
| 59 | + No API change |
| 60 | + |
| 61 | +- Increased performance of formatter lookup [#127,#129] |
| 62 | + No API change |
| 63 | + |
| 64 | +- Increased performance of symbols lookup [#143] |
| 65 | + No API change |
| 66 | + |
| 67 | + |
| 68 | +Compatibility with 2.3 |
| 69 | +---------------------- |
| 70 | +Build system - Yes |
| 71 | + |
| 72 | +Binary compatible - Yes |
| 73 | + |
| 74 | +Source compatible - Yes |
| 75 | + |
| 76 | +Serialization compatible - Yes |
| 77 | + |
| 78 | +Data compatible - Yes, except |
| 79 | + - DateTimeZone data updated to version 2014e |
| 80 | + |
| 81 | +Semantic compatible - Yes, except |
| 82 | +- DateTimeField duration fields have been fixed |
| 83 | + For example, yearOfEra() now has a range of eras() rather than null |
| 84 | + The DurationField instances now compare using equals() correctly |
| 85 | +- MutableDateTime.add(DateTimeFieldType,int), addDays(int) and friends [#77] |
| 86 | + Adding zero will no longer change the offset during DST overlap in autumn/fall |
| 87 | + |
| 88 | + |
| 89 | +Deprecations since 2.3 |
| 90 | +---------------------- |
| 91 | + |
| 92 | + |
| 93 | +Bug fixes since 2.3 |
| 94 | +------------------- |
| 95 | +- DateTimeField.getDurationField() / DateTimeField.getRangeDurationField() [#92,#93,#95] |
| 96 | + Previously some of the complex cases were wrong, notably around centuries and eras |
| 97 | + For example, yearOfEra() returned a range of null when it should be eras() |
| 98 | + A slew of tests were added and a variety of bugs fixed |
| 99 | + This affects DateTimeField.getDurationField() and DateTimeField.getRangeDurationField() |
| 100 | + |
| 101 | +- Fixed another edge case in conversion from Local to UTC [#76] |
| 102 | + The DateTimeZone.getOffsetFromLocal() method was fixed to handle the last cutover |
| 103 | + in DST history correctly. |
| 104 | + |
| 105 | +- Period construction during DST overlap [#156] |
| 106 | + When creating a period, if one end is within a DST overlap and one beyond the overlap |
| 107 | + then the calculated period was incorrect. |
| 108 | + The calculation has been changed no ensure no extra hour is added. |
| 109 | + |
| 110 | +- DateTimeUtils.isContiguous(ReadablePartial) [#89] |
| 111 | + The isContiguous() method could throw a NullPointerException when evaluating weird partials |
| 112 | + |
| 113 | +- Period.normalizedStandard(PeriodType) [#79] |
| 114 | + Fix handling of PeriodType when either years or months missing |
| 115 | + |
| 116 | +- Partial.with(DateTimeFieldType,int) [#88] |
| 117 | + Validation in this method was not as thorough as that in the constructor |
| 118 | + This allowed invalid partials to be created |
| 119 | + |
| 120 | +- MutableDateTime.add(DateTimeFieldType,int), addDays(int) and friends [#77] |
| 121 | + Adding zero to a MutableDateTime used to change the offset during DST overlap in autumn/fall |
| 122 | + This is now fixed to not change the offset |
| 123 | + |
| 124 | +- DateTime/MutableDateTime constructors taking millis now validate [#100] |
| 125 | + Previously, new DateTime(Long.MAX_VALUE) would be accepted, now it will be rejected |
| 126 | + This ensures that the maximum/minimum year are respected |
| 127 | + |
| 128 | +- Ensure isLeap() returns correct result for day fields [#110] |
| 129 | + Day-of-month and day-of-year fields should report leap days |
| 130 | + |
| 131 | +- Insist that year > weekyear when creating Partial [#96,#98] |
| 132 | + As these compare equal code previously allowed either order |
| 133 | + |
| 134 | +- Handle weird TimeZone implementations with null ID [#133] |
| 135 | + Calling DateTimeZone.forTimeZone() would break if the ID was null |
| 136 | + |
| 137 | +- Handle broken Android implementations better [#103] |
| 138 | + Apparently some Android implementations throw ClassCastException when comparing different types |
| 139 | + Thats dumb and wrong but the change to handle it is harmless |
| 140 | + |
| 141 | +- Better concurrency in parsing [#101] |
| 142 | + |
| 143 | +- Better Javadoc for parsing of numbers in format patterns [#60] |
| 144 | + |
| 145 | +- Remove uncaughtException calls [#59] |
| 146 | + Previously the code called ThreadGroup.uncaughtException() which was invalid |
| 147 | + |
| 148 | +- Fix Javadoc for ReadableDuration [#137] |
| 149 | + |
| 150 | +- Fix the links to the IANA time zone database [#83] |
| 151 | + |
| 152 | +- Better Javadoc for thread saefty of DateTimeUtils [#67] |
| 153 | + |
| 154 | +- Better Javadoc for DateTimeComparator [#73] |
| 155 | + |
| 156 | +- Better Javadoc for DateTimeFormatter parsing [#78] |
| 157 | + |
| 158 | +- Better Javadoc for DateTimeFormat fraction of second [#62] |
| 159 | + |
| 160 | +- Better Javadoc for DateTime toString and parse [#142] |
| 161 | + |
| 162 | +- Better Javadoc for formatters that only parse [#97] |
| 163 | + |
| 164 | + |
| 165 | +Scala |
| 166 | +-------- |
| 167 | +Joda-Time uses annotations from Joda-Convert. |
| 168 | +In the Java programming language, this dependency is optional, however in Scala it is not. |
| 169 | +Scala users must manually add the Joda-Convert v1.2 dependency. |
| 170 | +</source> |
| 171 | +</p> |
| 172 | +</section> |
| 173 | + |
| 174 | +</body> |
| 175 | +</document> |
0 commit comments