JEP 150: Date & Time API

AuthorStephen Colebourne
OwnerXueming Shen
Created2012/02/22 20:00
Updated2014/07/10 20:16
TypeFeature
StatusCompleted
Componentcore-libs
ScopeSE
JSR310
Discussioncore dash libs dash dev at openjdk dot java dot net
EffortL
DurationL
Priority4
Endorsed byBrian Goetz
Release8
Issue8046140
BlocksJEP 170: JDBC 4.2
DuplicatesJEP 151: Compress Time-Zone Data

Summary

Define a new date, time, and calendar API for the Java SE platform.

Goals

Non-Goals

It is not a goal to solve all date/time problems, but the new API should be a suitable base for external extensions.

Motivation

The existing Java date and time classes are poor, mutable, and have unpredictable performance. There has been a long-standing desire for a better date and time API based on the Joda-Time project. The new API will have a more intuitive design allowing code to better express its intent. The classes will also be immutable which aligns with the multi-core direction of the industry.

Description

The JSR 310 EG has been working on a new date/time API for Java platform. The goal of this project is to integrate the JSR 310 reference implementation into JDK 8.

Integration will involve successfully working with any new module system. There may be a need to provide for core embedded and mobile module with a subset of functionality.

The project will also require the JSR 310 classes to be integrated with existing classes. For example, there should be only one source of time-zone data in the JDK. It is also intended that the existing formatters will support the new classes.

Testing

No specific requests beyond the normal unit/regression test development. JSR 310 has already developed a large test suite, which is being divided into TCK and non-TCK tests.

Risks and Assumptions

The project is primarily implemented by non-Oracle personnel who are not funded to work full-time on this project.

A review of immutability and thread-safety will be necessary and is assumed.

Dependences

Impact