You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Joerg Schaible (JIRA)" <ji...@apache.org> on 2011/07/13 19:01:00 UTC

[jira] [Created] (LANG-719) FastDateFormat formats year differently than SimpleDateFormat in Java 7

FastDateFormat formats year differently than SimpleDateFormat in Java 7
-----------------------------------------------------------------------

                 Key: LANG-719
                 URL: https://issues.apache.org/jira/browse/LANG-719
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.time.*
            Reporter: Joerg Schaible
            Assignee: Joerg Schaible
             Fix For: 3.0


Starting with Java 7 does SimpleDateFormat format a year pattern of 'Y' or 'YYY' as '2003' instead of '03' as in former Java releases. According Javadoc this pattern should have been always been formatted as number, therefore the new behavior seems to be a bug fix in the JDK. FastDateFormat is adjusted to behave the same.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (LANG-719) FastDateFormat formats year differently than SimpleDateFormat in Java 7

Posted by "Joerg Schaible (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joerg Schaible resolved LANG-719.
---------------------------------

    Resolution: Fixed

{noformat}
commit -m "Adjust FastDateFormat for Java 7 behavior regarding format of the year pattern (LANG-719)." /home/joehni/src/Commons/proper/lang/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java /home/joehni/src/Commons/proper/lang/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
    Sending        /home/joehni/src/Commons/proper/lang/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
    Sending        /home/joehni/src/Commons/proper/lang/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
    Transmitting file data ...
    Committed revision 1146138.
{noformat}

> FastDateFormat formats year differently than SimpleDateFormat in Java 7
> -----------------------------------------------------------------------
>
>                 Key: LANG-719
>                 URL: https://issues.apache.org/jira/browse/LANG-719
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.time.*
>            Reporter: Joerg Schaible
>            Assignee: Joerg Schaible
>             Fix For: 3.0
>
>
> Starting with Java 7 does SimpleDateFormat format a year pattern of 'Y' or 'YYY' as '2003' instead of '03' as in former Java releases. According Javadoc this pattern should have been always been formatted as number, therefore the new behavior seems to be a bug fix in the JDK. FastDateFormat is adjusted to behave the same.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira