FINAL PROPOSAL: Provide date and time library from JSR-310
scolebourne at joda.org
Sat Mar 1 13:21:55 PST 2008
Provision of the JSR-310, Date and Time API, Reference Implementation
suitable for inclusion in OpenJDK.
Stephen Colebourne (team lead) & Michael Nascimento Santos
Two of the least liked APIs of the JDK are those of Date and Calendar.
The classes are mutable when they shouldn't be, have unusual performance
characteristics and months where January is zero. The formatting and
parsing code is also not thread-safe. Developers using the JDK have a
'clear need' for a better date and time API.
To tackle the issue, JSR-310  was launched to provide a new Date and
Time API. The target for the JSR is inclusion in Java 7, which naturally
means inclusion in Open JDK. All work of the JSR is performed in public
JSR-310 is an original development. It is inspired by previous work,
notably Joda-Time , however the final result will be a completely new
API, capable of being descibed as an 'original work'. Code is not
being ported or reused from Joda-Time.
This project is a team submission. Stephen Colebourne is the lead for
the rules of the Open JDK Challenge.
2. Goals and deliverables
The goal of this project is to provide a complete working Reference
Implementation (RI) of JSR-310 as agreed by the JSR-310 working group.
It should be noted that the JSR is unlikely to be complete within the
timeframe of the challenge. As such, the goal for this project is to
complete the RI as required by the working group. Although a commitment
cannot be made here, it is intended that this should be used to publish
the RI for the JCP Early Draft Review milestone.
JSR-310 and this RI project shall cover as a minimum - immutable classes
for timestamps, dates, times, datetimes, timezone, timezone offset,
alternate calendar systems, duration, period, interval, formatting and
3. Previous work
Work on the RI has already started  and continues to guide the
working group. This project represents the continuation of that development.
As a rough estimate, the current codebase contains about 50% of the
likely eventual classes. Of the existing classes, about 50% are code
complete, whilst the other 50% are stubs or incomplete. Tests exist for
about 10% of the existing codebase.
The Reference Implementation is BSD licensed. It is not proposed to
change that as it is compatible with the GPL license.
If this proposal is selected, and proceeds to completion, the entire RI
codebase will be made available under the SCA (both the parts already
coded, and the additions made since).
Development milestones shall ultimately be determined by the JSR-310
working group. However the outline plan is:
1) Complete the development of the RI using stub methods
2) Integration with the existing Java classes, such as Date and Calendar
3) Provision of tests and appropriate bug fixes
The deliverables are:
1) The source code of the Reference Implementation of JSR-310.
2) The source code of any existing JDK classes modified as part of JSR-310.
3) Source code documentation in the form of javadoc suitable for
inclusion in the JDK.
4) Tests with 90%+ test coverage.
It is expected that the deliverables will correspond to the JCP Early
Draft Review stage.
The JSR-310 specification document does not form part of the
deliverables of this proposal.
6. Dependencies on Sun
There are no known dependencies on Sun over and above those Sun has
already agreed to by joining the JSR-310 working group.
Stephen Colebourne has worked with Java since 1997 and in Open Source
since 2000. He is a Member of the Apache Software Foundation, creator
and project lead of Joda-Time , creator of Kijaro  and co-author
of FCM closures. He is currently a hands-on architect at SITA ATS Ltd
building airline e-commerce systems.
Michael Nascimento Santos has worked with Java for more than 8 years,
from J2ME to J2EE. He has contributed to 5 other JSRs besides JSR-310
and is a leading figure in Brazialian open source and leads the Genesis
framework project . He works for Summa Technologies do Brasil Ltda.
More information about the challenge-discuss