Java 日期時間處理類庫,Joda-Time v2.9.1 發布
JodaTime 提供了一組Java類包用于處理包括ISO8601標準在內的date和time。可以利用它把JDK Date和Calendar類完全替換掉,而且仍然能夠提供很好的集成。
Joda-Time主要的特點包括:
1. 易于使用:Calendar讓獲取"正常的"的日期變得很困難,使它沒辦法提供簡單的方法,而Joda-Time能夠 直接進行訪問域并且索引值1就是代表January。
- 易于擴展:JDK支持多日歷系統是通過Calendar的子類來實現,這樣就顯示的非常笨重而且事實 上要實現其它日歷系統是很困難的。Joda-Time支持多日歷系統是通過基于Chronology類的插件體系來實現。
- 提供一組完整的功能:它打算提供 所有關系到date-time計算的功能.Joda-Time當前支持6種日歷系統,而且在將來還會繼續添加。有著比JDK Calendar更好的整體性能等等。 </p>
Joda-Time v2.9.1 發布,更新如下:
2.9.1 Bug 修復
- Fix bug introduced by Long.MIN_VALUE and Long.MAX_VALUE changes [#328]
對 2.9 的改進
- Faster parsing of time-zone identifiers [#282]
- Added Interval.parseWithOffset(String) [#299, #296] Provides a way to parse the fixed offset in an interval string
- Add DateTimeFormatter methods for StringBuilder [#298]
- Add Russian period translations [#320]
- Add Italian period translations [#312]
- Add Czech period translations [#313]
- Clarify that PeriodFormatterBuilder is in an invalid state once built [#309]
- Allow DateTime and Interval to refer to values at Long.MIN_VALUE and Long.MAX_VALUE [#297, #190] A DateTime may be created with any millisecond value, however at the very edges there may be some undesirable effects, for example always using UTC instead of the time-zone
- Better error message for malformed tzdb files [#319]
- Better error message for interval constructor [#321]
2.8 和 2.9 的兼容
Build system - Yes
Binary compatible - Yes
Source compatible - Yes
Serialization compatible - Yes
Data compatible - Yes - DateTimeZone data updated to version 2015g
Semantic compatible - Yes
修復 2.9 的bug
- Fixed to handle JDK 8u60 [#288, #291] Without this fix, formatting a time-zone will print "+00:00" instead of "GMT" for the GMT time-zone
- Fix parsing of basic form ISO style where year has unnecessary plus sign [#86] For example, +20151030 will now be correctly parsed as year 2015.
- Fix overflow bug in intervals [#315]詳細更新請看:</pre>
下載:https://github.com/JodaOrg/joda-time/releases