[threeten-dev] JapaneseDate DAY_OF_YEAR

roger riggs roger.riggs at oracle.com
Mon Jul 1 10:15:25 PDT 2013


Hi,

I filed an issue #326 to track limiting dates to Meiji 6 and later.

Roger

[1] JBS 8019512

On 7/1/2013 12:44 PM, Masayoshi Okutsu wrote:
> On 2013/06/24 20:21, Stephen Colebourne wrote:
>> And there is a disagreemnet as to the start of the Meiji era.
>> sun.util.calendar.Era says 1868-01-01, wheras our Japanese Era says 
>> 1868-09-08.
>> Is the old Sun class wrong here?
>
> Both are wrong. 1968-01-01 is to extend Gregorian backwards from Meiji 
> 6 in which Gregorian was adopted in Japan. This is because of the lack 
> of the Tenpo calendar (a lunisolar calendar) support. 1868-01-01 is 
> wrong, but intentional in the sun.util.calendar implementation.
>
> 09-08 is the Keio-Meiji transition date in the lunisolar calendar, 
> which doesn't make sense in Gregorian. Its real Gregorian date is 
> 1868-10-23. Note that the whole lunisolar year became Meiji 1 by the 
> era transition rule at that time. The real Meiji 1-01-01 is Gregorian 
> 1868-01-25. If JSR 310 needs correct Meiji support before Meiji 6, the 
> lunisolar calendar must be supported.
>
> I've been proposing that JapaneseChronology supports dates from Meiji 6.
>
>> Showa is also different by a day.
>
> The initial version in 1.6 had that bug. But it was fixed long ago. 
> Which version are you referring to?
>
> Masayoshi
>
>>
>> The class needs a lot of tidying up I fear.
>>
>> Here are some more tests, with bugs commented out.
>> https://gist.github.com/jodastephen/5849354
>>
>> Who is working to fix this class?
>> thanks
>> Stephen
>>
>>
>>
>> On 24 June 2013 11:26, Stephen Colebourne <scolebourne at joda.org> wrote:
>>> The patch is fine, except for a cut and paste "Hijrah".
>>>
>>> There are lots of issues to work out with Japanese. I'd like to get
>>> the two patches I put out integrated as well.
>>> https://github.com/ThreeTen/threeten/issues/299#issuecomment-19831206
>>> https://github.com/ThreeTen/threeten/issues/318#issuecomment-19896959
>>>
>>> The public factory methods are also weird too. ofYearDay(int,int)  is
>>> public, unlike other date classes.
>>> Stephen
>>>
>>>
>>>
>>> On 21 June 2013 22:17, roger riggs <roger.riggs at oracle.com> wrote:
>>>> A number of problems were found with the DAY_OF_YEAR field in
>>>> JapaneseChronology/Date.
>>>> The values for the lengthOfYear() and range were incorrectly computed
>>>> interfering
>>>> with the operation of get() and with().
>>>>
>>>> The bugs.sun.com issue is: 8017105
>>>> <http://bugs.sun.com/view_bug.do?bug_id=8017105>
>>>>
>>>> Please review and comment:
>>>>
>>>> http://cr.openjdk.java.net/~rriggs/webrev-japanese-day-of-year-8017105/ 
>>>>
>>>>
>>>> Thanks, Roger
>>>>
>>>>
>



More information about the threeten-dev mailing list