[threeten-dev] Please help to review new test code for java.time.calendars.HijrahChronology
Roger Riggs
Roger.Riggs at oracle.com
Thu Jan 31 15:17:13 PST 2013
Hi Dan,
We can make it work, there are ample opportunities to fix up any
problems for SE 8.
The legal aspect is the only one that I'd worry about.
Thanks, Roger
On 1/31/2013 6:13 PM, Dan Chiba wrote:
> Hi Roger,
>
> Finally got an update from the SA presales team about the ETA of
> variants' data/spec:
>
> "The person we were directed to was on leave. I have left him several
> voice messages and following up. I believe we will have some feedback
> within two weeks max. Is this within the time frame for Rel 8?"
>
> I told them CCC request is due 2/4, merge is 2/13 so if we don't
> receive it soon, we may jeopardize the quality or even availability of
> Hijrah calendar support in the Java 8 release.
>
> As far as the default variant (Umm Al-Qura) goes, the data we
> currently have is very likely to be correct (from Microsoft
> implementation). I am not sure if the range is fine (currently 1900
> through 2080 Gregorian years) but I think this is a reasonable coverage.
>
> Can I just ask them to rush it asap and say we'll do our best to make
> the release? I asked specifically if there is any legal process is
> required, so we'll be less likely to run out of time. Anything else
> you suggest to be clear to them?
>
> Patrick,
>
> You could get the updated mapping of the Hijrah default variant and
> ISO dates here:
> https://stbeehive.oracle.com/content/dav/st/SGT/Public%20Documents/sgtc/projects/J2SE/JSR-310/HijrahData/umalqura.txt
>
>
> Regards,
> -Dan
>
> On 1/31/2013 5:54 AM, Roger Riggs wrote:
>> Hi Patrick,
>>
>> Yes it is only Hijrah that will be updated.
>>
>> Please push (or Sherman or I can push) all of your changes.
>>
>> Roger
>>
>>
>> On 1/31/2013 12:27 AM, Patrick Zhang wrote:
>>> Hi Roger,
>>>
>>> Thanks for update. Is the new change only for Hijrah calendar?
>>> Or I need to change test data for JapaneseChronology,
>>> MinguoChronology and ThaiBuddhistChronology also?
>>>
>>> If not, is it ok to push webrev for JapaneseChronology,
>>> MinguoChronology and ThaiBuddhistChronology into threeten repo firstly?
>>>
>>> Regards
>>> Patrick
>>>
>>> On 1/30/13 11:39 PM, Roger Riggs wrote:
>>>> Hi Patrick,
>>>>
>>>> The data for these tests may need to change; we are expecting
>>>> to replace the default Hijrah calendar with one defined by the
>>>> Saudi government
>>>> (Umm al-Qura).
>>>> Also there will be another variant as well.
>>>>
>>>> The structure of the test is good and it will be easy to update.
>>>>
>>>> Thanks, Roger
>>>>
>>>>
>>>>
>>>> On 1/30/2013 1:26 AM, Patrick Zhang wrote:
>>>>> Hi Team,
>>>>>
>>>>> Please help to review below new added test case:
>>>>> http://cr.openjdk.java.net/~pzhang/JSR310/java/time/calendars/HijrahChronology/test/java/time/tck/java/time/calendars/TestHijrahChronology.java.udiff.html
>>>>> <http://cr.openjdk.java.net/%7Epzhang/JSR310/java/time/calendars/HijrahChronology/test/java/time/tck/java/time/calendars/TestHijrahChronology.java.udiff.html>
>>>>>
>>>>>
>>>>> test result:
>>>>> http://cr.openjdk.java.net/~pzhang/JSR310/java/time/calendars/HijrahChronology/TestHijrahChronology.jtr
>>>>> <http://cr.openjdk.java.net/%7Epzhang/JSR310/java/time/calendars/HijrahChronology/TestHijrahChronology.jtr>
>>>>>
>>>>>
>>>>> Description:
>>>>> The new added test cases are used for prolepticYear() and
>>>>> isLeapYear().
>>>>> 1. As description of HijrahChronology, year
>>>>> 2,5,7,10,,13,16,18,21,24,26 and 29 will be leap years. So add
>>>>> test_isLeapYear() to check it. And for leap year,
>>>>> date(prolepticYear, 12, 30) should be equal with
>>>>> dateYearDay(prolepticYear, 355). For non-leap year,
>>>>> date(prolepticYear, 12, 29) should be equal with
>>>>> dateYearDay(prolepticYear, 354).
>>>>>
>>>>> 2. We can get below table from definition of HijrahChronology:
>>>>> ISO prolepticYear 618
>>>>> 619
>>>>> 620
>>>>> 621
>>>>> 622
>>>>> 623
>>>>> 624
>>>>> ...
>>>>> year of ERA_AH -2
>>>>> -1
>>>>> 0
>>>>> 1
>>>>> 2
>>>>> 3
>>>>> 4
>>>>> ...
>>>>> year of ERA_BEFORE_AH 3
>>>>> 2
>>>>> 1
>>>>> 0
>>>>> -1
>>>>> -2
>>>>> -3
>>>>> ...
>>>>>
>>>>>
>>>>> From above table, then we can get return value of prolepticYear():
>>>>> prolepticYear(ERA_AH, a) = a;
>>>>> prolepticYear(ERA_BEFORE_AH, a) + prolepticYear(ERA_AH, a) =
>>>>> 1; It means prolepticYear(ERA_BEFORE_AH, a)= 1-a.
>>>>>
>>>>> Above logic has been verified in test_prolepticYear()
>>>>>
>>>>>
>>>>> Regards
>>>>> Patrick
>>>>
>>>> --
>>>> 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
>>>>
>>
--
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