My question is how to handle the date when we want to store the dates from the moment of birth of the earth to the end of the earth (it is expected that it will be 100000000000000000000-12-31 23:59:00.0000 +1).
100000000000000000000-12-31 23:59:00.0000 +1
I am sure that some scholars have libraries for such dates. Since Joda-Time also uses long for internal storage, it goes beyond the scope. Designing a calender from scratch can be difficult as we need to handle all special cases, such as moving from the Julian to gregorian calendar and leap years / seconds ...
JSR-310 - The new Date / Time API in Java 8 - handles this already. From Instantdocs :
Instant
. , . , . .
backport Java 7, Java 8:)
JSR-310 , . ( ) , , . (, .) . , :)
EDIT: , , Instant "" .
, 100000000000000000000, JSR-310.
java.time.Instant ( , , ), API- MAX MIN, 1 . , JSR-310. RuntimeException. , JSR-310 , . Oracle-Bug-Log.
java.time.Instant
RuntimeException
, . , . , :
Time4J, JSR-310. , , . ! . , : 3000-4000 , gregorian calendar - .
, , . .