Bastian S :
I need to normalise some Data to execute a SQL-Statement. Unfortunately I can't initialize a LocalDate-variable with LocalDate.EPOCH. MIN and MAX are working.
startDatum = startDatum == null? LocalDate.EPOCH : startDatum; // doesn't work
endDatum = (endDatum == null)? LocalDate.MAX : endDatum; // works
Eclipse only says EPOCH cannot be resolved or is not a field
marstran :
The EPOCH
field on LocalDate
was new in Java 9. If you're using Java 8, you can do the following to get the LocalDate
at epoch:
LocalDate.ofEpochDay(0)