Java Code Examples for java.time.Year#atDay()

The following examples show how to use java.time.Year#atDay() . 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: Date.java    From baleen with Apache License 2.0 5 votes vote down vote up
private void createYearTimeRange(
    TextBlock block, Integer charBegin, Integer charEnd, Year y1, Year y2) {
  Temporal dtg = createExactRangeDate(block, charBegin, charEnd);

  LocalDate start = y1.atDay(1);
  LocalDate end = y2.plusYears(1).atDay(1);

  dtg.setTimestampStart(start.atStartOfDay(ZoneOffset.UTC).toEpochSecond());
  dtg.setTimestampStop(end.atStartOfDay(ZoneOffset.UTC).toEpochSecond());

  addToJCasIndex(dtg);
  extracted.add(dtg);
}
 
Example 2
Source File: TCKYear.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day0() {
    Year test = Year.of(2007);
    test.atDay(0);
}
 
Example 3
Source File: TCKYear.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day367() {
    Year test = Year.of(2007);
    test.atDay(367);
}
 
Example 4
Source File: TCKYear.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_notLeapYear_day366() {
    Year test = Year.of(2007);
    test.atDay(366);
}
 
Example 5
Source File: TCKYear.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day367() {
    Year test = Year.of(2007);
    test.atDay(367);
}
 
Example 6
Source File: TCKYear.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day0() {
    Year test = Year.of(2007);
    test.atDay(0);
}
 
Example 7
Source File: TCKYear.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_notLeapYear_day366() {
    Year test = Year.of(2007);
    test.atDay(366);
}
 
Example 8
Source File: TCKYear.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day0() {
    Year test = Year.of(2007);
    test.atDay(0);
}
 
Example 9
Source File: TCKYear.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day0() {
    Year test = Year.of(2007);
    test.atDay(0);
}
 
Example 10
Source File: TCKYear.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day367() {
    Year test = Year.of(2007);
    test.atDay(367);
}
 
Example 11
Source File: TCKYear.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day0() {
    Year test = Year.of(2007);
    test.atDay(0);
}
 
Example 12
Source File: TCKYear.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day367() {
    Year test = Year.of(2007);
    test.atDay(367);
}
 
Example 13
Source File: TCKYear.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_notLeapYear_day366() {
    Year test = Year.of(2007);
    test.atDay(366);
}
 
Example 14
Source File: TCKYear.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_notLeapYear_day366() {
    Year test = Year.of(2007);
    test.atDay(366);
}
 
Example 15
Source File: TCKYear.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_notLeapYear_day366() {
    Year test = Year.of(2007);
    test.atDay(366);
}
 
Example 16
Source File: TCKYear.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day367() {
    Year test = Year.of(2007);
    test.atDay(367);
}
 
Example 17
Source File: TCKYear.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day0() {
    Year test = Year.of(2007);
    test.atDay(0);
}
 
Example 18
Source File: TCKYear.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_notLeapYear_day366() {
    Year test = Year.of(2007);
    test.atDay(366);
}
 
Example 19
Source File: TCKYear.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day367() {
    Year test = Year.of(2007);
    test.atDay(367);
}
 
Example 20
Source File: TCKYear.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Test(expectedExceptions=DateTimeException.class)
public void test_atDay_day0() {
    Year test = Year.of(2007);
    test.atDay(0);
}