[
https://issues.apache.org/jira/browse/TRINIDAD-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Cale Scholl updated TRINIDAD-1821:
----------------------------------
Status: Patch Available (was: Open)
> client-side DateFormat improperly parses year when format mask contains 3 or
> more 'y'
> -------------------------------------------------------------------------------------
>
> Key: TRINIDAD-1821
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1821
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Reporter: Cale Scholl
> Priority: Minor
> Attachments: date_subparse_year_1.2.12.3.patch,
> date_subparse_year_2.0.0.3.1.patch, date_subparse_year_trunk.patch
>
>
> The following section of code was located in the _subparse function of
> trinidad-impl DateFormat.js and was ripped out:
> else if (charCount == 4)
> {
> // Bug 2169562: For four-digit year formats, reject
> // three-year entries. Fair enough!
> if (enteredChars == 3)
> return false;
> if (enteredChars <= 2)
> year = _fix2DYear(year);
> }
> If a 4-digit format mask is specified for the year, it means full year
> format, so any number is valid. Read the following:
> http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
> In particular:
> "For parsing, if the number of pattern letters is more than 2, the year is
> interpreted literally, regardless of the number of digits. So using the
> pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D."
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.