Java Code Examples for java.time.temporal.ChronoUnit#DECADES
The following examples show how to use
java.time.temporal.ChronoUnit#DECADES .
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: TCKYear.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="minus_long_TemporalUnit") Object[][] data_minus_long_TemporalUnit() { return new Object[][] { {Year.of(1), 1, ChronoUnit.YEARS, Year.of(0), null}, {Year.of(1), -12, ChronoUnit.YEARS, Year.of(13), null}, {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(999999999), 1, ChronoUnit.ERAS, Year.of(-999999999 + 1), null}, {Year.of(105), 1, ChronoUnit.CENTURIES, Year.of(5), null}, {Year.of(15), 1, ChronoUnit.DECADES, Year.of(5), null}, {Year.of(-999999999), 1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), -999999999, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.MONTHS, null, DateTimeException.class}, }; }
Example 2
Source File: TCKYear.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="minus_long_TemporalUnit") Object[][] data_minus_long_TemporalUnit() { return new Object[][] { {Year.of(1), 1, ChronoUnit.YEARS, Year.of(0), null}, {Year.of(1), -12, ChronoUnit.YEARS, Year.of(13), null}, {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(999999999), 1, ChronoUnit.ERAS, Year.of(-999999999 + 1), null}, {Year.of(105), 1, ChronoUnit.CENTURIES, Year.of(5), null}, {Year.of(15), 1, ChronoUnit.DECADES, Year.of(5), null}, {Year.of(-999999999), 1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), -999999999, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.MONTHS, null, DateTimeException.class}, }; }
Example 3
Source File: TCKYear.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="plus_long_TemporalUnit") Object[][] data_plus_long_TemporalUnit() { return new Object[][] { {Year.of(1), 1, ChronoUnit.YEARS, Year.of(2), null}, {Year.of(1), -12, ChronoUnit.YEARS, Year.of(-11), null}, {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-1), 1, ChronoUnit.ERAS, Year.of(2), null}, {Year.of(5), 1, ChronoUnit.CENTURIES, Year.of(105), null}, {Year.of(5), 1, ChronoUnit.DECADES, Year.of(15), null}, {Year.of(999999999), 1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(-999999999), -1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.MONTHS, null, DateTimeException.class}, }; }
Example 4
Source File: TCKYear.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="plus_long_TemporalUnit") Object[][] data_plus_long_TemporalUnit() { return new Object[][] { {Year.of(1), 1, ChronoUnit.YEARS, Year.of(2), null}, {Year.of(1), -12, ChronoUnit.YEARS, Year.of(-11), null}, {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-1), 1, ChronoUnit.ERAS, Year.of(2), null}, {Year.of(5), 1, ChronoUnit.CENTURIES, Year.of(105), null}, {Year.of(5), 1, ChronoUnit.DECADES, Year.of(15), null}, {Year.of(999999999), 1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(-999999999), -1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.MONTHS, null, DateTimeException.class}, }; }
Example 5
Source File: TCKYear.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="minus_long_TemporalUnit") Object[][] data_minus_long_TemporalUnit() { return new Object[][] { {Year.of(1), 1, ChronoUnit.YEARS, Year.of(0), null}, {Year.of(1), -12, ChronoUnit.YEARS, Year.of(13), null}, {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(999999999), 1, ChronoUnit.ERAS, Year.of(-999999999 + 1), null}, {Year.of(105), 1, ChronoUnit.CENTURIES, Year.of(5), null}, {Year.of(15), 1, ChronoUnit.DECADES, Year.of(5), null}, {Year.of(-999999999), 1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), -999999999, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.MONTHS, null, DateTimeException.class}, }; }
Example 6
Source File: TCKYear.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="minus_long_TemporalUnit") Object[][] data_minus_long_TemporalUnit() { return new Object[][] { {Year.of(1), 1, ChronoUnit.YEARS, Year.of(0), null}, {Year.of(1), -12, ChronoUnit.YEARS, Year.of(13), null}, {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(999999999), 1, ChronoUnit.ERAS, Year.of(-999999999 + 1), null}, {Year.of(105), 1, ChronoUnit.CENTURIES, Year.of(5), null}, {Year.of(15), 1, ChronoUnit.DECADES, Year.of(5), null}, {Year.of(-999999999), 1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), -999999999, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.MONTHS, null, DateTimeException.class}, }; }
Example 7
Source File: TCKYear.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="minus_long_TemporalUnit") Object[][] data_minus_long_TemporalUnit() { return new Object[][] { {Year.of(1), 1, ChronoUnit.YEARS, Year.of(0), null}, {Year.of(1), -12, ChronoUnit.YEARS, Year.of(13), null}, {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(999999999), null}, {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, {Year.of(999999999), 1, ChronoUnit.ERAS, Year.of(-999999999 + 1), null}, {Year.of(105), 1, ChronoUnit.CENTURIES, Year.of(5), null}, {Year.of(15), 1, ChronoUnit.DECADES, Year.of(5), null}, {Year.of(-999999999), 1, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), -999999999, ChronoUnit.YEARS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, {Year.of(1), 0, ChronoUnit.MONTHS, null, DateTimeException.class}, }; }
Example 8
Source File: TCKDuration.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="BadTemporalUnit") Object[][] provider_factory_of_badTemporalUnit() { return new Object[][] { {0, MICROS}, {0, MILLIS}, {0, MINUTES}, {0, HOURS}, {0, HALF_DAYS}, {0, DAYS}, {0, ChronoUnit.MONTHS}, {0, ChronoUnit.YEARS}, {0, ChronoUnit.DECADES}, {0, ChronoUnit.CENTURIES}, {0, ChronoUnit.MILLENNIA}, }; }
Example 9
Source File: TCKDuration.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="BadTemporalUnit") Object[][] provider_factory_of_badTemporalUnit() { return new Object[][] { {0, MICROS}, {0, MILLIS}, {0, MINUTES}, {0, HOURS}, {0, HALF_DAYS}, {0, DAYS}, {0, ChronoUnit.MONTHS}, {0, ChronoUnit.YEARS}, {0, ChronoUnit.DECADES}, {0, ChronoUnit.CENTURIES}, {0, ChronoUnit.MILLENNIA}, }; }
Example 10
Source File: TCKDuration.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
@DataProvider(name="BadTemporalUnit") Object[][] provider_factory_of_badTemporalUnit() { return new Object[][] { {0, MICROS}, {0, MILLIS}, {0, MINUTES}, {0, HOURS}, {0, HALF_DAYS}, {0, DAYS}, {0, ChronoUnit.MONTHS}, {0, ChronoUnit.YEARS}, {0, ChronoUnit.DECADES}, {0, ChronoUnit.CENTURIES}, {0, ChronoUnit.MILLENNIA}, }; }
Example 11
Source File: TCKPeriod.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="BadTemporalUnit") Object[][] data_badTemporalUnit() { return new Object[][] { {ChronoUnit.MICROS}, {ChronoUnit.MILLIS}, {ChronoUnit.HALF_DAYS}, {ChronoUnit.DECADES}, {ChronoUnit.CENTURIES}, {ChronoUnit.MILLENNIA}, }; }
Example 12
Source File: TCKYearMonth.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="minus_long_TemporalUnit") Object[][] data_minus_long_TemporalUnit() { return new Object[][] { {YearMonth.of(1, 10), 1, ChronoUnit.YEARS, YearMonth.of(0, 10), null}, {YearMonth.of(1, 10), 12, ChronoUnit.YEARS, YearMonth.of(-11, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.YEARS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 1), 999999999, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 12), -999999999, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(1, 10), 1, ChronoUnit.MONTHS, YearMonth.of(1, 9), null}, {YearMonth.of(1, 10), 12, ChronoUnit.MONTHS, YearMonth.of(0, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.MONTHS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(-999999999, 2), 1, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(999999999, 11), -1, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(1, 10), 1, ChronoUnit.ERAS, YearMonth.of(0, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.CENTURIES, YearMonth.of(-95, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.DECADES, YearMonth.of(-5, 10), null}, {YearMonth.of(999999999, 12), -1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(-999999999, 1), 1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, }; }
Example 13
Source File: TCKPeriod.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="BadTemporalUnit") Object[][] data_badTemporalUnit() { return new Object[][] { {ChronoUnit.MICROS}, {ChronoUnit.MILLIS}, {ChronoUnit.HALF_DAYS}, {ChronoUnit.DECADES}, {ChronoUnit.CENTURIES}, {ChronoUnit.MILLENNIA}, }; }
Example 14
Source File: TCKYearMonth.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="plus_long_TemporalUnit") Object[][] data_plus_long_TemporalUnit() { return new Object[][] { {YearMonth.of(1, 10), 1, ChronoUnit.YEARS, YearMonth.of(2, 10), null}, {YearMonth.of(1, 10), -12, ChronoUnit.YEARS, YearMonth.of(-11, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.YEARS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 1), -999999999, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 12), 999999999, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(1, 10), 1, ChronoUnit.MONTHS, YearMonth.of(1, 11), null}, {YearMonth.of(1, 10), -12, ChronoUnit.MONTHS, YearMonth.of(0, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.MONTHS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(-999999999, 2), -1, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(999999999, 3), 9, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-1, 10), 1, ChronoUnit.ERAS, YearMonth.of(2, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.CENTURIES, YearMonth.of(105, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.DECADES, YearMonth.of(15, 10), null}, {YearMonth.of(999999999, 12), 1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(-999999999, 1), -1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, }; }
Example 15
Source File: TCKYearMonth.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="plus_long_TemporalUnit") Object[][] data_plus_long_TemporalUnit() { return new Object[][] { {YearMonth.of(1, 10), 1, ChronoUnit.YEARS, YearMonth.of(2, 10), null}, {YearMonth.of(1, 10), -12, ChronoUnit.YEARS, YearMonth.of(-11, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.YEARS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 1), -999999999, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 12), 999999999, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(1, 10), 1, ChronoUnit.MONTHS, YearMonth.of(1, 11), null}, {YearMonth.of(1, 10), -12, ChronoUnit.MONTHS, YearMonth.of(0, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.MONTHS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(-999999999, 2), -1, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(999999999, 3), 9, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-1, 10), 1, ChronoUnit.ERAS, YearMonth.of(2, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.CENTURIES, YearMonth.of(105, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.DECADES, YearMonth.of(15, 10), null}, {YearMonth.of(999999999, 12), 1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(-999999999, 1), -1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, }; }
Example 16
Source File: TCKPeriod.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="BadTemporalUnit") Object[][] data_badTemporalUnit() { return new Object[][] { {ChronoUnit.MICROS}, {ChronoUnit.MILLIS}, {ChronoUnit.HALF_DAYS}, {ChronoUnit.DECADES}, {ChronoUnit.CENTURIES}, {ChronoUnit.MILLENNIA}, }; }
Example 17
Source File: TCKPeriod.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="BadTemporalUnit") Object[][] data_badTemporalUnit() { return new Object[][] { {ChronoUnit.MICROS}, {ChronoUnit.MILLIS}, {ChronoUnit.HALF_DAYS}, {ChronoUnit.DECADES}, {ChronoUnit.CENTURIES}, {ChronoUnit.MILLENNIA}, }; }
Example 18
Source File: TCKYearMonth.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@DataProvider(name="minus_long_TemporalUnit") Object[][] data_minus_long_TemporalUnit() { return new Object[][] { {YearMonth.of(1, 10), 1, ChronoUnit.YEARS, YearMonth.of(0, 10), null}, {YearMonth.of(1, 10), 12, ChronoUnit.YEARS, YearMonth.of(-11, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.YEARS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 1), 999999999, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(0, 12), -999999999, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, {YearMonth.of(1, 10), 1, ChronoUnit.MONTHS, YearMonth.of(1, 9), null}, {YearMonth.of(1, 10), 12, ChronoUnit.MONTHS, YearMonth.of(0, 10), null}, {YearMonth.of(1, 10), 0, ChronoUnit.MONTHS, YearMonth.of(1, 10), null}, {YearMonth.of(999999999, 12), 0, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(-999999999, 1), 0, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(-999999999, 2), 1, ChronoUnit.MONTHS, YearMonth.of(-999999999, 1), null}, {YearMonth.of(999999999, 11), -1, ChronoUnit.MONTHS, YearMonth.of(999999999, 12), null}, {YearMonth.of(1, 10), 1, ChronoUnit.ERAS, YearMonth.of(0, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.CENTURIES, YearMonth.of(-95, 10), null}, {YearMonth.of(5, 10), 1, ChronoUnit.DECADES, YearMonth.of(-5, 10), null}, {YearMonth.of(999999999, 12), -1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(-999999999, 1), 1, ChronoUnit.MONTHS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.DAYS, null, DateTimeException.class}, {YearMonth.of(1, 1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, }; }
Example 19
Source File: TimePeriod.java From java-timeseries with MIT License | 2 votes |
/** * Create and return a new TimePeriod representing one half of a century. * * @return a new TimePeriod representing one half of a century. */ public static TimePeriod halfCentury() { return new TimePeriod(ChronoUnit.DECADES, 5); }
Example 20
Source File: TimePeriod.java From java-timeseries with MIT License | 2 votes |
/** * Create and return a new TimePeriod representing exactly one decade. * * @return a new TimePeriod representing exactly one decade. */ public static TimePeriod oneDecade() { return new TimePeriod(ChronoUnit.DECADES, 1); }