红联Linux门户
Linux帮助

Joda-Time v2.9发布,Java日期时间处理库

发布时间:2015-10-30 09:08:01来源:红联作者:empast
Joda-Time v2.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]

兼容
----------------------
Build system - Yes

Binary compatible - Yes

Source compatible - Yes

Serialization compatible - Yes

Data compatible - Yes
- DateTimeZone data updated to version 2015g

Semantic compatible - Yes


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]

JodaTime 提供了一组Java类包用于处理包括ISO8601标准在内的date和time。可以利用它把JDK Date和Calendar类完全替换掉,而且仍然能够提供很好的集成。

Joda-Time主要的特点包括:

1. 易于使用:Calendar让获取"正常的"的日期变得很困难,使它没办法提供简单的方法,而Joda-Time能够 直接进行访问域并且索引值1就是代表January。
2. 易于扩展:JDK支持多日历系统是通过Calendar的子类来实现,这样就显示的非常笨重而且事实 上要实现其它日历系统是很困难的。Joda-Time支持多日历系统是通过基于Chronology类的插件体系来实现。
3. 提供一组完整的功能:它打算提供 所有关系到date-time计算的功能.Joda-Time当前支持6种日历系统,而且在将来还会继续添加。有着比JDK Calendar更好的整体性能等等。

软件详情:http://www.joda.org/joda-time/upgradeto290.html

下载地址:https://github.com/JodaOrg/joda-time/releases

来自:开源中国社区
文章评论

共有 0 条评论