Java Code Examples for java.time.Period#minusDays()
The following examples show how to use
java.time.Period#minusDays() .
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: TCKPeriod.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 2
Source File: TCKPeriod.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 3
Source File: TCKPeriod.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 4
Source File: TCKPeriod.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 5
Source File: TCKPeriod.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 6
Source File: TCKPeriod.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 7
Source File: TCKPeriod.java From j2objc with Apache License 2.0 | 4 votes |
@Test(expected=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 8
Source File: TCKPeriod.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 9
Source File: TCKPeriod.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 10
Source File: TCKPeriod.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 11
Source File: TCKPeriod.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 12
Source File: TCKPeriod.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 13
Source File: TCKPeriod.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 14
Source File: TCKPeriod.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 15
Source File: TCKPeriod.java From j2objc with Apache License 2.0 | 4 votes |
@Test(expected=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 16
Source File: TCKPeriod.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 17
Source File: TCKPeriod.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 18
Source File: TCKPeriod.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooBig() { Period test = Period.ofDays(Integer.MAX_VALUE); test.minusDays(-1); }
Example 19
Source File: TCKPeriod.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { Period test = Period.ofDays(Integer.MIN_VALUE); test.minusDays(1); }
Example 20
Source File: DateTimeExtensions.java From groovy with Apache License 2.0 | 2 votes |
/** * Returns a {@link java.time.Period} that is {@code days} days shorter than this period. * No normalization is performed. * * @param self a Period * @param days the number of days to decrease this Period by * @return a Period * @since 2.5.0 */ public static Period minus(final Period self, long days) { return self.minusDays(days); }