Java Code Examples for java.time.chrono.JapaneseDate#lengthOfYear()
The following examples show how to use
java.time.chrono.JapaneseDate#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: TCKJapaneseChronology.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 2
Source File: TCKJapaneseChronology.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 3
Source File: TCKJapaneseChronology.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 4
Source File: TCKJapaneseChronology.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 5
Source File: TCKJapaneseChronology.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 6
Source File: TCKJapaneseChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 7
Source File: TCKJapaneseChronology.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 8
Source File: TCKJapaneseChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 9
Source File: TCKJapaneseChronology.java From hottub with GNU General Public License v2.0 | 6 votes |
@Test public void test_getDayOfYear() { // Test all the Eras for (JapaneseEra era : JapaneseEra.values()) { int firstYear = (era == JapaneseEra.MEIJI) ? 6 : 1; // Until Era supports range(YEAR_OF_ERA) JapaneseDate hd1 = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, 1); ValueRange range = hd1.range(DAY_OF_YEAR); assertEquals(range.getMaximum(), hd1.lengthOfYear(), "lengthOfYear should match range.getMaximum()"); for (int i = 1; i <= hd1.lengthOfYear(); i++) { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(era, firstYear, i); int doy = hd.get(DAY_OF_YEAR); assertEquals(doy, i, "get(DAY_OF_YEAR) incorrect for " + i + ", of date: " + hd); } } }
Example 10
Source File: TCKJapaneseChronology.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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 11
Source File: TCKJapaneseChronology.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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 12
Source File: TCKJapaneseChronology.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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 13
Source File: TCKJapaneseChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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: TCKJapaneseChronology.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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 15
Source File: TCKJapaneseChronology.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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: TCKJapaneseChronology.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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 17
Source File: TCKJapaneseChronology.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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: TCKJapaneseChronology.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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 19
Source File: TCKJapaneseChronology.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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: TCKJapaneseChronology.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test public void test_withDayOfYear() { JapaneseDate hd = JapaneseChronology.INSTANCE.dateYearDay(1990, 1); for (int i = 1; i <= hd.lengthOfYear(); i++) { JapaneseDate 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); } }