[threeten-dev] Review for parsing 2 to 4 years #218
roger riggs
roger.riggs at oracle.com
Wed May 1 10:54:59 PDT 2013
Hi,
> What about this test case:
> {YEAR, 2, 4, 2000, "+10", 0, strict(0, null), lenient(3, 2010)},
> Should that not result in year 10, as no signs should be allowed for base value?
NOT_NEGATIVE allows a '+/-' sign if the field is not fixed width and
parsing is lenient,
both true in this case.
The ReducedPrinterParser sees a parse width of 2 digits in setValue
and can check the value for negative but is not aware of the "+" sign.
This won't come up in the pattern cases because the width is fixed at 2.
Roger
More information about the threeten-dev
mailing list