You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Yee-Wah Lee (Updated) (JIRA)" <de...@myfaces.apache.org> on 2012/02/29 21:47:58 UTC
[jira] [Updated] (TRINIDAD-2224) Client DateTimeConverter
_fix2DYear does not handle th_TH locale
[ https://issues.apache.org/jira/browse/TRINIDAD-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yee-Wah Lee updated TRINIDAD-2224:
----------------------------------
Status: Patch Available (was: Open)
> Client DateTimeConverter _fix2DYear does not handle th_TH locale
> ----------------------------------------------------------------
>
> Key: TRINIDAD-2224
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2224
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 2.0.0-core
> Reporter: Yee-Wah Lee
> Priority: Minor
> Attachments: branch121262_2224_thai2DigitYears.diff, trunk_2224_DateFormatThaiTwoDigitYears.diff
>
>
> The th_TH calendar uses dates that are offset by 543 years from Gregorian calendar (which Javascript uses). The client DateTimeConverter handles this by adding/subtracting from the Gregorian value during formatting/parsing user strings.
> However, when the user enters a 2 digit year string and the parsing code calls _fix2DYear to adjust it to the correct century, it does not account for the offset. The value, specified in trinidad-config.xml as two-digit-year-start, is defaulted to 1950 and the documentation states that it is treated as a Gregorian year. The code should adjust the two-digit to Thai calendar while calculating, otherwise the parsed value would be off.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira