You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2012/09/26 20:03:07 UTC
[jira] [Reopened] (LANG-828) FastDateParser does not handle
non-Gregorian calendars properly
[ https://issues.apache.org/jira/browse/LANG-828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb reopened LANG-828:
-----------------------
Much searching and experimentation reveals that the reason for the problems is as mentioned here: [1]
i.e. DateFormatSymbols#getEras() returns a pair of strings for Gregorian calendar AD and BC; the method does not return the correct eras for th_TH or ja_JP_JP locales.
Also, these locales have long and short versions.
The solution is as mentioned in [1], i.e. use
Calendar.getDisplayNames(Calendar.ERA, Calendar.SHORT, locale);
for all locales.
[1] https://issues.apache.org/jira/browse/TRINIDAD-2126
> FastDateParser does not handle non-Gregorian calendars properly
> ---------------------------------------------------------------
>
> Key: LANG-828
> URL: https://issues.apache.org/jira/browse/LANG-828
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.time.*
> Affects Versions: 3.1
> Reporter: Sebb
> Fix For: 3.2
>
>
> The following calendars are non-Gregorian [1]:
> ja_JP_JP - Japanese Imperial)
> th_TH (with any variant) - Thai Buddhist
> This causes errors when testing round-trip conversions.
> The simplest solution is to fall back to SimpleDateFormat for these calendars.
> [1] http://docs.oracle.com/javase/6/docs/technotes/guides/intl/calendar.doc.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira