Java Code Examples for java.time.YearMonth#minusMonths()
The following examples show how to use
java.time.YearMonth#minusMonths() .
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: TCKYearMonth.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 2
Source File: TCKYearMonth.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MAX_VALUE); }
Example 3
Source File: TCKYearMonth.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 1); test.minusMonths(1); }
Example 4
Source File: TCKYearMonth.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MAX_VALUE); }
Example 5
Source File: TCKYearMonth.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 6
Source File: TCKYearMonth.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 1); test.minusMonths(1); }
Example 7
Source File: TCKYearMonth.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooLarge() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(-1); }
Example 8
Source File: TCKYearMonth.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 9
Source File: TCKYearMonth.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 1); test.minusMonths(1); }
Example 10
Source File: TCKYearMonth.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 11
Source File: TCKYearMonth.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 12
Source File: TCKYearMonth.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MAX_VALUE); }
Example 13
Source File: TCKYearMonth.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 14
Source File: TCKYearMonth.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 1); test.minusMonths(1); }
Example 15
Source File: TCKYearMonth.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 16
Source File: TCKYearMonth.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MAX_VALUE); }
Example 17
Source File: TCKYearMonth.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MAX_VALUE); }
Example 18
Source File: TCKYearMonth.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); }
Example 19
Source File: TCKYearMonth.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MAX_VALUE); }
Example 20
Source File: DateTimeExtensions.java From groovy with Apache License 2.0 | 2 votes |
/** * Returns a {@link java.time.YearMonth} that is {@code months} months before this year/month. * * @param self a YearMonth * @param months the number of months to subtract * @return a Year * @since 2.5.0 */ public static YearMonth minus(final YearMonth self, long months) { return self.minusMonths(months); }