我应该使用 Threeten 而不是 joda-time
我遇到了 https://blog.joda .org/2009/11/why-jsr-310-isn-joda-time_4941.html。
1)我目前正在将Java日历迁移到joda-time。我想知道,我应该使用 Threeten 而不是 joda-time 吗?三十生产准备好了吗?
2)同一个应用程序中可以同时存在三个库和joda-time库吗?因为我正在使用一些第三方库,它也使用 joda-time 库。
3)joda-time 会因为有 10 个而成为废弃项目吗?
I came across https://blog.joda.org/2009/11/why-jsr-310-isn-joda-time_4941.html.
1) I am currently migrating Java Calendar to joda-time. I was wondering, should I use threeten instead of joda-time? Is threeten production ready?
2) Can threeten library and joda-time libraries exist together in a same application? As I am using some 3rd parties libraries, which is using joda-time library too.
3) Will joda-time become an abandon project since there is threeten?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
官方回复:
截至2011年1月,ThreeTen仍然是我认为的Alpha。这意味着我是
更改方法名称、类出现和消失等。也就是说,
那里的代码基本上是合理的并且可以告诉正确的时间。
因此,我目前建议项目在 ThreeTen 之前使用 Joda-Time
进入 Beta 版,将于今年(2011 年)的某个时候进入。
Joda-Time 和 ThreeTen 可以同时存在于同一个中
应用。当 ThreeTen 稳定后我打算添加接口
从 ThreeTen 到 Joda-Time,提供互操作性。然而,
互操作性永远不会容易,因为类具有相同的
名称。
《Joda-Time》将在 ThreeTen 之后的一段时间内继续发布
已完成。但如果 JSR-310,将会推动转向 ThreeTen
完成后,它在 Java SE 8 中。
更新,2014 年 3 月,
截至 2014 年 3 月 5 日,JSR-310 为 已批准包含在 Java JDK 8 中。有关详细信息,请参阅ThreeTen 主页< /a>.
Official reply:
As of January 2011, ThreeTen is still what I'd classify as an Alpha. That means that I am
changing method names, classes appear and disappear etc. That said,
the code that is there is basically sound and tells the right time.
As such, I currently advise projects to use Joda-Time until ThreeTen
enters Beta, which will be this year (2011) at some point.
It is possible to have both Joda-Time and ThreeTen in the same
application. When ThreeTen is stable I intend to add the interfaces
from ThreeTen to Joda-Time providing interoperability. However,
interoperability will never be easy as the classes have the same
names.
Joda-Time will continue to be released for a good period after ThreeTen
is complete. But there will be a push to move to ThreeTen if JSR-310
completes such that it is in Java SE 8.
Update, March 2014,
As of 2014-03-05, JSR-310 was approved for inclusion in Java JDK 8. For more information, see the ThreeTen home page.
这只是我会做的一个建议。
由于 Joda-time 经过了很多用户的严格测试,并且他们仍然推荐它,这意味着它是一个很好的库。 JSR-310——在您的这篇文章之前我还没有见过这个。另外,我不确定有多少人在使用它——或者它是否完全没有错误。也许它解决了您发布的链接中提到的 Joda-time 问题,但什么保证它没有更新的错误。
也就是说,我将等待 JSR-310 成熟并流行。可能会在一些非关键项目中使用。并且,最终可能会像博主所说的那样接受它,“(JSR-310 是)一个‘受 Joda-Time 启发’的 API”。同时,我将使用 Joda-time。
环顾与此相关的内容,我发现了这个:http://sourceforge。 net/apps/mediawiki/thirden/index.php?title=ThreeTen
它引用:
我建议不要立即使用它
This is just a suggestion what I would do.
Since Joda-time is heavily tested by lots of users and they still recommend it, that means it's a good library. JSR-310 -- I haven't seen this before this post of yours. Also, I am not sure how many people are using it -- or if it's completely bug free. May be it solves the Joda-time issues mentioned in the link that you have posted, but what guarantees that it is not having a newer bug.
That said, I will wait for JSR-310 to mature and be popular. And probably use in some of the non-critical projects. And, probably, eventually accept it as the blogger says, "(JSR-310 is) an API 'inspired by Joda-Time'" . In the mean time, I will use Joda-time.
Looking around the stuffs regarding it, I found this: http://sourceforge.net/apps/mediawiki/threeten/index.php?title=ThreeTen
It quotes:
I WOULD RECOMMEND TO NOT TO USE IT RIGHT AWAY
Joda-Time 主要的问题是不支持 Um Qura 日历,它支持科威特日历
The main concern about Joda-Time is doesn't support Um Qura Calendar , it's support Kuwaiti Calendar