将ThreeTen backport与JSR-310进行比较 [英] Comparing ThreeTen backport to JSR-310

查看:232
本文介绍了将ThreeTen backport与JSR-310进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,我们现在不能使用java 8 - 我们仍然坚持使用java 7.

但是,我想使用新的 JSR -310日期/时间API 现在使用官方backport ThreeTen

For some reasons, we can't use java 8 right now - we're still stuck at java 7.
However, I'd like to use the new JSR-310 date/time APIs right now, using the official backport ThreeTen.

其主页声明:

The backport is NOT an implementation of JSR-310, as that would require 
jumping through lots of unnecessary hoops. Instead, this is a simple backport
intended to allow users to quickly use the JSR-310 API on Java SE 6 and 7.

问题:


  1. 您的体验是什么? 和ThreeTen一起?是否存在一些缺点?

  1. What are your experience with ThreeTen? Are there some drawbacks?

与官方 JSR-310相比,此项目兼容的方式实施?

How compatible is this project compared to the official JSR-310 implementations?

迁移从ThreeTen到官方java 8需要多少努力 实施?

How much effort is required to migrate from ThreeTen to an official java 8 implementation?

值得现在迁移到ThreeTen以及稍后迁移到JSR-310 - 还是应该有人等到可以使用java 8,hencing跳过ThreeTen?

Is it worth to migrate now to ThreeTen and later to JSR-310 - or should someone wait until java 8 can be used, hencing skipping ThreeTen?


推荐答案

看到这个< a href =http://blog.joda.org/2014/07/threeten-backport-vs-joda-time.html\"rel =noreferrer>博客文章。

ThreeTen-Backport是一个坚固的后端,由主API的等效代码组成(虽然对非ISO日历系统不太好)。要转换为Java 8 java.time 需要更改包名称,并将一些常量更改为方法引用。

ThreeTen-Backport is a solid backport consisting of equivalent code for the main API (though not so good for non-ISO calendar systems). To convert to Java 8 java.time requires changing the package name, and altering some constants to be method references.

我不建议从Joda-Time迁移到ThreeTen-Backport,但建议从Joda-Time迁移到Java 8 java.time

I would not advise migrating from Joda-Time to ThreeTen-Backport, but do advise migrating from Joda-Time to Java 8 java.time.

这篇关于将ThreeTen backport与JSR-310进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆