# jsr310

Published articles for jsr310.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Java Time (JSR-310) enhancements in Java SE 9

DevFeed: [Java Time (JSR-310) enhancements in Java SE 9](<https://devfeed.tech/articles/java-time-jsr-310-enhancements-in-java-se-9-21993.md>)

Original publisher: [Read original article](<http://blog.joda.org/2017/02/java-time-jsr-310-enhancements-java-9.html>)

Author: Stephen Colebourne (noreply@blogger.com)

Published: 2017-02-07T14:47:00Z

Content type: article

Language: en

Sources: [Stephen Colebourne](<https://devfeed.tech/sources/stephen-colebourne.md>)

Topics: [DateTime](<https://devfeed.tech/topics/datetime.md>), [Java](<https://devfeed.tech/topics/java.md>), [LocalDate](<https://devfeed.tech/topics/localdate.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [format](<https://devfeed.tech/tags/format.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [java](<https://devfeed.tech/tags/java.md>), [java9](<https://devfeed.tech/tags/java9.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [jsr310](<https://devfeed.tech/tags/jsr310.md>), [localdate](<https://devfeed.tech/tags/localdate.md>), [stream](<https://devfeed.tech/tags/stream.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This article reviews selected enhancements to the java.time API planned for Java SE 9 after its introduction in Java SE 8. It covers new LocalDate date-stream methods, higher clock precision and millisecond-compatible ticking, more efficient epoch-second conversion, expanded Duration operations, new Instant conversion factories, and additional date-time formatting and parsing support.

### Source excerpt

The java.time.* API (JSR-310) was added to Java SE 8, but what has been going on since then? Java Time in Java SE 9 There are currently 117 java time issues targetted into Java SE 9. Most of these are not especially interesting, with a lot of mistakes in the Javadoc that needed fixing. What follows are some of the interesting ones: Main enhancements: JDK-8146218 - Add LocalDate.datesUntil method producing Stream. Adds two new methods - LocalDate.datesUntil(LocalDate) and LocalDate.datesUntil(LocalDate,Period) - returning a stream of dates. JDK-8068730 - Increase precision of Clock.systemUTC(). The clock in Java - System.currentTimeMillis() - has ticked in milliseconds since Java was first released. With Java SE 9, users of Clock will see higher precision, depending on the available clock of the operating system. JDK-8071919 - Clock.tickMillis(ZoneId zone) method. With the system clock now returning higher precision, a new method was added - Clock.tickMillis(ZoneId) - that chops off the extra precision to restrore the millisecond ticking behaviour of Java SE 8. JDK-8030864 - Add efficient getDateTimeMillis method to java.time. This adds two methods named epochSecond to Chronology that have no object creation to convert date-time fields to an epoch-second. JDK-8142936 - Duration methods for days, hours, minutes, seconds, etc. The Java SE 8 API of Duration turned out to be incomplete for certain use cases. This change adds a slew of new methods that allow parts of the duration to be reliably returned. JDK-8148849 - Truncating Duration. Adds a method Duration.truncatedTo(TemporalUnit) to allow truncation, similar to the existing method on Instant. JDK-8032510 - Add Duration.dividedBy(Duration). A new method to allow a duration to be divided by another duration. JDK-8133079 - LocalDate and LocalTime ofInstant() factory methods. Add new factory methods in LocalDate and LocalTime to simplify conversion from Instant. JDK-8143413 - Add toEpochSecond methods for efficient acc