[threeten-dev] print Era with Chronology overriding
Xueming Shen
xueming.shen at oracle.com
Wed Jan 30 14:59:07 PST 2013
good point. thanks! webrev has been updated accordingly.
On 01/30/2013 02:38 PM, Stephen Colebourne wrote:
> You should just be able to return date.getChronology(), which will
> perform better.
> Stephen
>
> On 30 January 2013 22:29, Xueming Shen<xueming.shen at oracle.com> wrote:
>> Yes, you are correct. It appears the adjust() is buggy, the chronology is
>> from the original temporal, instead of the adjusted date.
>>
>> webrev has been updated accordingly.
>>
>> http://cr.openjdk.java.net/~sherman/jdk8_threeten/fmtEra/
>>
>> -Sherman
>>
>>
>> On 01/30/2013 01:44 PM, Stephen Colebourne wrote:
>>> On 30 January 2013 20:14, Xueming Shen<xueming.shen at oracle.com> wrote:
>>>> (1) It appears the print/parse context is not passing the possible
>>>> overriding chronology to the printerparser, so DTF.withChronology()
>>>> does have impact the print/parse result when a specified chronology
>>>> is preferred. This is particular an issue when the era name is different
>>>> in the non-iso chronology, Japanese for example.
>>> The DateTimePrintContext adjust() method should be handling this
>>> already. The approach you've taken doesn't work as it doesn't convert
>>> a class like LocalDate to the correct ChronoLocalDate. It is possible
>>> that adjust() doesn't work correctly of course...
>>>
>>> Stephen
>>
More information about the threeten-dev
mailing list