Java Code Examples for java.time.chrono.HijrahChronology#INSTANCE

The following examples show how to use java.time.chrono.HijrahChronology#INSTANCE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestUmmAlQuraChronology.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void Test_UmmAlQuraChronoRange() {
    HijrahChronology chrono = HijrahChronology.INSTANCE;
    ValueRange year = chrono.range(YEAR);
    assertEquals(year.getMinimum(), 1300, "Minimum year");
    assertEquals(year.getLargestMinimum(), 1300, "Largest minimum year");
    assertEquals(year.getMaximum(), 1600, "Largest year");
    assertEquals(year.getSmallestMaximum(), 1600, "Smallest Maximum year");

    ValueRange month = chrono.range(MONTH_OF_YEAR);
    assertEquals(month.getMinimum(), 1, "Minimum month");
    assertEquals(month.getLargestMinimum(), 1, "Largest minimum month");
    assertEquals(month.getMaximum(), 12, "Largest month");
    assertEquals(month.getSmallestMaximum(), 12, "Smallest Maximum month");

    ValueRange day = chrono.range(DAY_OF_MONTH);
    assertEquals(day.getMinimum(), 1, "Minimum day");
    assertEquals(day.getLargestMinimum(), 1, "Largest minimum day");
    assertEquals(day.getMaximum(), 30, "Largest day");
    assertEquals(day.getSmallestMaximum(), 29, "Smallest Maximum day");
}
 
Example 2
Source File: TCKChronoZonedDateTimeSerialization.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE},
    };
}
 
Example 3
Source File: TCKChronoZonedDateTimeSerialization.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE},
    };
}
 
Example 4
Source File: TCKChronologySerialization.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 5
Source File: TCKChronoZonedDateTime.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE},
    };
}
 
Example 6
Source File: TCKChronoLocalDate.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 7
Source File: TCKChronoLocalDate.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 8
Source File: TCKHijrahChronology.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test_chrono_byName() {
    Chronology c = HijrahChronology.INSTANCE;
    Chronology test = Chronology.of("Hijrah-umalqura");
    Assert.assertNotNull(test, "The Hijrah-umalqura calendar could not be found by name");
    Assert.assertEquals(test.getId(), "Hijrah-umalqura", "ID mismatch");
    Assert.assertEquals(test.getCalendarType(), "islamic-umalqura", "Type mismatch");
    Assert.assertEquals(test, c);
}
 
Example 9
Source File: TCKHijrahChronology.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test_chrono_byName() {
    Chronology c = HijrahChronology.INSTANCE;
    Chronology test = Chronology.of("Hijrah-umalqura");
    Assert.assertNotNull(test, "The Hijrah-umalqura calendar could not be found by name");
    Assert.assertEquals(test.getId(), "Hijrah-umalqura", "ID mismatch");
    Assert.assertEquals(test.getCalendarType(), "islamic-umalqura", "Type mismatch");
    Assert.assertEquals(test, c);
}
 
Example 10
Source File: TCKChronoZonedDateTimeSerialization.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE},
    };
}
 
Example 11
Source File: TCKChronologySerialization.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 12
Source File: TCKChronoLocalDateTime.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 13
Source File: TCKChronology.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendarsystemtype")
Object[][] data_CalendarType() {
    return new Object[][] {
        {HijrahChronology.INSTANCE, "islamic-umalqura"},
        {IsoChronology.INSTANCE, "iso8601"},
        {JapaneseChronology.INSTANCE, "japanese"},
        {MinguoChronology.INSTANCE, "roc"},
        {ThaiBuddhistChronology.INSTANCE, "buddhist"},
    };
}
 
Example 14
Source File: TCKChronologySerialization.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 15
Source File: TCKChronoPeriod.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 16
Source File: TCKChronoLocalDateTime.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 17
Source File: TCKChronoPeriod.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}
 
Example 18
Source File: TCKHijrahChronology.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void test_chrono_byName() {
    Chronology c = HijrahChronology.INSTANCE;
    Chronology test = Chronology.of("Hijrah-umalqura");
    Assert.assertNotNull(test, "The Hijrah-umalqura calendar could not be found by name");
    Assert.assertEquals(test.getId(), "Hijrah-umalqura", "ID mismatch");
    Assert.assertEquals(test.getCalendarType(), "islamic-umalqura", "Type mismatch");
    Assert.assertEquals(test, c);
}
 
Example 19
Source File: TCKChronoZonedDateTimeSerialization.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE},
    };
}
 
Example 20
Source File: TCKChronoPeriod.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name = "calendars")
Chronology[][] data_of_calendars() {
    return new Chronology[][]{
                {HijrahChronology.INSTANCE},
                {IsoChronology.INSTANCE},
                {JapaneseChronology.INSTANCE},
                {MinguoChronology.INSTANCE},
                {ThaiBuddhistChronology.INSTANCE}};
}