Is there any reason to use Joda Time if I can use Java 8 Date and Time API (java.time
)?
Should I use Java 8 Date and Time every time?
相关问题
- Java Instant.parse on Date java 8
- Jackson to deserialize Joda LocalDate from ISO Dat
- Which class does LongAdder extends?
- XmlAdapter to JAXB-bind Joda Time Interval?
- Single element in multiple groups when grouping wi
相关文章
- Handling ffmpeg library interface change when upgr
- ceil conterpart for Math.floorDiv in Java?
- Do JDK classes have any further specifications bey
- java.time.ZonedDateTime.parse and iso8601?
- Java “static import” vs. “import static” in Java 8
- Will java allow to use functional interfaces as me
- How to enable “type information” for streams retur
- Unable to open keystore in AndroidStudio - “Redund
The official statement of the author of Joda-time himself is to migrate as soon as Java-8 is available. See also this citation from the website:
So the short answer to your question is: YES (deprecated). However, keep in mind that some features like Joda-
Interval
orPeriodType
orPeriodFormatter
are not available in Java-8 so you have to write your own partially ugly workarounds, see also my SO-post about differences between Joda-Time and JSR-310.Side remarks about the future of both libraries:
What does "finished" means in this context?
Well, you can compare the Joda-issue 254 with my small discussion on Twitter. I think people should rather set down their expectations to any major enhancement of Joda-Time. Please also consider that the future development resources regarding Joda-Time are limited (lack of manpower). And let's be honest: Most releases since Joda-Time in year 2008 rather have the character of bugfix releases (with the exception of 2.0).
On the other side: The innovation speed of JSR-310 will probably not be very high, too (because it is already big, and because Oracle is here the decisive player and a date-time-library is in general not considered as the central cornerstone of any Java-release). So there is always some space left for an external library in the future to supply missing features, for example (in alphabetical order):