[threeten-dev] Non-webrev: Change yyyy to uuuu
Stephen Colebourne
scolebourne at joda.org
Tue Feb 19 23:31:54 PST 2013
On 20 February 2013 00:48, Masayoshi Okutsu <masayoshi.okutsu at oracle.com> wrote:
> I haven't looked at code changes yet, but I noticed the following test data
> change.
>
> - { "\u662d\u548c64\u5e741\u67089\u65e5\u6708\u66dc\u65e5" }, // S64.01.09
> (Mon)
> + // line commented out, as S64.01.09 seems like a reasonable thing to parse
> + // (era "S" ended on S64.01.07, but a little leniency is a good thing
> +// { "\u662d\u548c64\u5e741\u67089\u65e5\u6708\u66dc\u65e5" }, // S64.01.09
> (Mon)
>
> What's the reason behind this change? Is there any way to validate given
> Japanese calendar dates?
I'd be happy for further suggestions here, given I don't read Japanese ;-)
As far as I can tell, S64.01.06 is a valid Japanese date, but
S64.01.09 is after the start of the new era, whereas S65.01.09 is
definitely after the start of the new era.
The old code seemed to reject both the "invalid" ones. The new code is
more lenient, only rejecting based on the year. So, S64 is valid
because some dates in that year are valid, whereas S65 is invalid
because no dates in that year are valid.
Seem reasonable?
(See also the changes in JapaneseChronlogy)
Stephen
More information about the threeten-dev
mailing list