Possible JDK 7 issue

Stephen Colebourne scolebourne at joda.org
Wed Jul 13 07:48:33 UTC 2011

This message is forwarded from Apache Commons, where a question was
raised as to whether the change in behaviour of year formatting in JDK
7 was deliberate:


---------- Forwarded message ----------
From: Jörg Schaible <joerg.schaible at gmx.de>
Date: 12 July 2011 18:56
Subject: Re: [lang] RC4 heads up
To: dev at commons.apache.org

1/ FastDateFormat
The date format "yyyy yyy yy y" is formatted with JDK 7 as "2003 2003 03
2003" instead of "2003 03 03 03". So, should FastDateFormat follow the JDK
in any case and adjust its result according the runtime? Interestingly
Javadoc states already for Java 6: "For formatting, if the number of pattern
letters is 2, the year is truncated to 2 digits; otherwise it is interpreted
as a number."

More information about the core-libs-dev mailing list