Java Code Examples for java.time.LocalDateTime#MIN

The following examples show how to use java.time.LocalDateTime#MIN . These examples are extracted from open source projects. 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
@DataProvider(name="adjustInto")
Object[][] data_adjustInto() {
    return new Object[][]{
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 23, 5, 0, 0), null},
            {LocalDateTime.of(2012, Month.MARCH, 4, 0, 0), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 0, 0), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), null},
            {LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, null},
            {LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, null},

            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZoneOffset.UTC), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZoneOffset.UTC), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, OFFSET_PONE), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), ZonedDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZONE_PARIS), ZonedDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZONE_PARIS), null},

            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalTime.of(22, 3, 0), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetTime.of(22, 3, 0, 0, ZoneOffset.UTC), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), null, null, NullPointerException.class},

    };
}
 
Example 2
@DataProvider(name="adjustInto")
Object[][] data_adjustInto() {
    return new Object[][]{
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 23, 5, 0, 0), null},
            {LocalDateTime.of(2012, Month.MARCH, 4, 0, 0), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 0, 0), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), null},
            {LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, null},
            {LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, null},

            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZoneOffset.UTC), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZoneOffset.UTC), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, OFFSET_PONE), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), ZonedDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZONE_PARIS), ZonedDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZONE_PARIS), null},

            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalTime.of(22, 3, 0), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetTime.of(22, 3, 0, 0, ZoneOffset.UTC), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), null, null, NullPointerException.class},

    };
}
 
Example 3
@DataProvider(name="adjustInto")
Object[][] data_adjustInto() {
    return new Object[][]{
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 23, 5, 0, 0), null},
            {LocalDateTime.of(2012, Month.MARCH, 4, 0, 0), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 0, 0), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), null},
            {LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, null},
            {LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, null},

            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZoneOffset.UTC), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZoneOffset.UTC), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, OFFSET_PONE), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null},
            {LocalDateTime.of(2012, 3, 4, 23, 5), ZonedDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZONE_PARIS), ZonedDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZONE_PARIS), null},

            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), LocalTime.of(22, 3, 0), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetTime.of(22, 3, 0, 0, ZoneOffset.UTC), null, DateTimeException.class},
            {LocalDateTime.of(2012, 3, 4, 23, 5), null, null, NullPointerException.class},

    };
}
 
Example 4
@BeforeMethod
public void setUp() {
    MAX_DATE_TIME = LocalDateTime.MAX;
    MIN_DATE_TIME = LocalDateTime.MIN;
    MAX_INSTANT = MAX_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
    MIN_INSTANT = MIN_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
}
 
Example 5
@BeforeMethod
public void setUp() {
    MAX_DATE_TIME = LocalDateTime.MAX;
    MIN_DATE_TIME = LocalDateTime.MIN;
    MAX_INSTANT = MAX_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
    MIN_INSTANT = MIN_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
}
 
Example 6
@BeforeMethod
public void setUp() {
    MAX_DATE_TIME = LocalDateTime.MAX;
    MIN_DATE_TIME = LocalDateTime.MIN;
    MAX_INSTANT = MAX_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
    MIN_INSTANT = MIN_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
}
 
Example 7
@Test(expected = IOException.class)
public void closeWithNoEvent() throws IOException {
    final ProtoParquetWriter<Message> writerMock = mock(ProtoParquetWriter.class);
    final BiConsumer<String, String> protoMetadataWriter = mock(BiConsumer.class);

    final ProtoParquetWriterWithOffset parquetWriter = new ProtoParquetWriterWithOffset<>(writerMock,
        createTmpFile(), finalPath, localFs, new HdfsOffsetComputer(localFs, finalPath, 2), LocalDateTime.MIN, "ignored",
        protoMetadataWriter, 0);

    parquetWriter.close();
}
 
Example 8
@BeforeMethod
public void setUp() {
    MAX_DATE_TIME = LocalDateTime.MAX;
    MIN_DATE_TIME = LocalDateTime.MIN;
    MAX_INSTANT = MAX_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
    MIN_INSTANT = MIN_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
}
 
Example 9
@BeforeMethod
public void setUp() {
    MAX_DATE_TIME = LocalDateTime.MAX;
    MIN_DATE_TIME = LocalDateTime.MIN;
    MAX_INSTANT = MAX_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
    MIN_INSTANT = MIN_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
}
 
Example 10
Source Project: hazelcast-jet-demos   File: Race.java    License: Apache License 2.0 5 votes vote down vote up
private RaceDetails(long ID) {
    id = ID;
    odds = new HashMap<>();
    raceTime = LocalDateTime.MIN;
    version = 1;
    winner = Optional.empty();
}
 
Example 11
Source Project: j2objc   File: TCKLocalDateTime.java    License: Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() {
    MAX_DATE_TIME = LocalDateTime.MAX;
    MIN_DATE_TIME = LocalDateTime.MIN;
    MAX_INSTANT = MAX_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
    MIN_INSTANT = MIN_DATE_TIME.atZone(ZoneOffset.UTC).toInstant();
}
 
Example 12
@Override
public int compare(Viewer viewer, Object e1, Object e2){
	IFinding p1 = (IFinding) e1;
	IFinding p2 = (IFinding) e2;
	int rc = 0;
	switch (propertyIndex) {
	case 0:
	case 1:
		LocalDateTime t1 = LocalDateTime.MIN;
		LocalDateTime t2 = LocalDateTime.MIN;
		if (p1 instanceof IObservation) {
			t1 = ((IObservation) p1).getEffectiveTime().orElse(LocalDateTime.MIN);
		}
		if (p2 instanceof IObservation) {
			t2 = ((IObservation) p2).getEffectiveTime().orElse(LocalDateTime.MIN);
		}
		rc = t1.compareTo(t2);
		break;
	case 2:
		String txt1 = p1.getText().orElse("");
		String txt2 = p2.getText().orElse("");
		rc = txt1.toLowerCase().compareTo(txt2.toLowerCase());
		break;
	default:
		rc = 0;
	}
	// If descending order, flip the direction
	if (direction == DESCENDING) {
		rc = -rc;
	}
	return rc;
}
 
Example 13
@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, };
    return Arrays.asList(array);
}
 
Example 14
@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, };
    return Arrays.asList(array);
}
 
Example 15
@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, };
    return Arrays.asList(array);
}
 
Example 16
Source Project: j2objc   File: TCKLocalDateTime.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, };
    return Arrays.asList(array);
}
 
Example 17
@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, };
    return Arrays.asList(array);
}
 
Example 18
@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, };
    return Arrays.asList(array);
}
 
Example 19
@Override
protected LocalDateTime getDefaultMinValue() {
    return LocalDateTime.MIN;
}
 
Example 20
@Override
protected List<TemporalAccessor> samples() {
    TemporalAccessor[] array = {TEST_2007_07_15_12_30_40_987654321, LocalDateTime.MAX, LocalDateTime.MIN, };
    return Arrays.asList(array);
}