commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1389976 - in /commons/proper/lang/trunk/src: changes/changes.xml main/java/org/apache/commons/lang3/time/FastDateParser.java test/java/org/apache/commons/lang3/time/FastDateParserTest.java
Date Tue, 25 Sep 2012 17:26:18 GMT
On 25 September 2012 18:06, Honton, Charles <Charles_Honton@intuit.com> wrote:
> Seems a little extreme solution.

At least it allows the class to work with all Locales now, whereas
previously it would fail with those locales.

> Exactly where does the FastDateParser fail with non-Gregorian calendars?

You can try it and see - just  comment out the code in FastDateParser
that creates the SimpleDateFormatStrategy.

The main problem is that the formatted date output does not match the
generated regex.

In the case of ja_JP_JP this is because the short form era
designations (M T S H) are not returned by the getEras() method.
I tried patching these in, but then the issue is that the eras are
quite complicated to evaluate, see [1]

If you have a patch to fix that, please create a JIRA issue and attach it.

> The parser should just be setting fields on a Calendar object which does the calculations.

It does.

> Are the fields being properly parsed?

No, see above.

> Is a proper Calendar object being created?

Yes.

> chas

[1] http://docs.oracle.com/javase/6/docs/technotes/guides/intl/calendar.doc.html

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message