[threeten-dev] Non-webrev: Part one of better date parsing

roger riggs roger.riggs at oracle.com
Tue Mar 5 09:42:28 PST 2013


hi,

I don't have a better alternative.  Dealing with the map is pretty 
heavyweight
but fits the parser model.  I'd have rather seen that code in the type 
that was
being constructed (like a lenient "from" method) and using the 
TemporalAccessor
and isSupported.  But this is headed in a useful direction.

So yes, push.

Roger

On 3/5/2013 9:05 AM, Stephen Colebourne wrote:
> This patch is needed to fix Japanese era parsing and allow day-of-year
> to change its meaning (if that is so decided). Can it be pushed?
> Stephen
>
>
> On 27 February 2013 22:11, Stephen Colebourne <scolebourne at joda.org> wrote:
>> I envisage a boolean flag indicating strict/lenient, passed to
>> TemporalField and Chronology.
>>
>> I don't think that affects this patch, which is simply locating the
>> builder code in the right location - ChronoField is by definition
>> meaningless without the chronology, so thats where the logic has to
>> sit.
>>
>> Stephen
>>
>>
>> On 27 February 2013 19:06, roger riggs <roger.riggs at oracle.com> wrote:
>>> Hi Stephen,
>>>
>>> To extend it will require that the semantics of various leniency levels
>>> would be
>>> propagated to the Chronology. It would be better if the leniency
>>> concepts can be self contained in the parser.  In related cases, the
>>> dates are corrected to the "previous valid" date.
>>>
>>> Roger
>>>
>>>
>>> On 2/27/2013 11:37 AM, Stephen Colebourne wrote:
>>>> Issue: #268
>>>> Patch: https://gist.github.com/jodastephen/5049319
>>>>
>>>> This can then be extended to "fix" the stricter Japanese era
>>>> requirements, and add lenient/strict resolving in general.
>>>>
>>>> Stephen
>>>

-- 
Thanks, Roger

Oracle Java Platform Group

Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment



More information about the threeten-dev mailing list