Java Code Examples for java.time.chrono.HijrahDate#lengthOfYear()
The following examples show how to use
java.time.chrono.HijrahDate#lengthOfYear() .
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-backup with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 2
Source File: TestUmmAlQuraChronology.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 3
Source File: TestUmmAlQuraChronology.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 4
Source File: TestUmmAlQuraChronology.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 5
Source File: TestUmmAlQuraChronology.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 6
Source File: TestUmmAlQuraChronology.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 7
Source File: TestUmmAlQuraChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 8
Source File: TestUmmAlQuraChronology.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 9
Source File: TestUmmAlQuraChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 10
Source File: TestUmmAlQuraChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 11
Source File: TestUmmAlQuraChronology.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 12
Source File: TestUmmAlQuraChronology.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 13
Source File: TestUmmAlQuraChronology.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 14
Source File: TestUmmAlQuraChronology.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 15
Source File: TestUmmAlQuraChronology.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 16
Source File: TestUmmAlQuraChronology.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 17
Source File: TestUmmAlQuraChronology.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 18
Source File: TestUmmAlQuraChronology.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test public void test_getDayOfYear() { HijrahDate hd1 = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd1.lengthOfYear(); i++) { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i); } }
Example 19
Source File: TestUmmAlQuraChronology.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(1434, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { HijrahDate hd2 = hd.with(DAY_OF_YEAR, i); int doy = hd2.get(DAY_OF_YEAR); assertEquals(doy, i, "with(DAY_OF_YEAR) incorrect for " + i + " " + hd2); } }
Example 20
Source File: IslamicDate.java From jstarcraft-core with Apache License 2.0 | 2 votes |
/** * 获取指定年份的天数 * * @param year * @return */ public static int getDaySize(int year) { HijrahDate date = HijrahDate.of(year, 1, 1); return date.lengthOfYear(); }