Reputation: 31
I am currently working on a simple program to create and display timelines for history students and I ran into a problem.
When creating a new event, users have to fill a little form including DatePickers object to select start date and end date for the event. My problem is with date Before Christ or negative date. I can't seem to use them. Hence my questions:
Thanks in advance!
Kind regards, A
Upvotes: 2
Views: 1685
Reputation: 11
getEra public Era getEra() Gets the era applicable at this date. The official ISO-8601 standard does not define eras, however IsoChronology does. It defines two eras, 'CE' from year one onwards and 'BCE' from year zero backwards. Since dates before the Julian-Gregorian cutover are not in line with history, the cutover between 'BCE' and 'CE' is also not aligned with the commonly used eras, often referred to using 'BC' and 'AD'.
Users of this class should typically ignore this method as it exists primarily to fulfill the ChronoLocalDate contract where it is necessary to support the Japanese calendar system.
The returned era will be a singleton capable of being compared with the constants in IsoChronology using the == operator.
Specified by: getEra in interface ChronoLocalDate Returns: the IsoChronology era constant applicable at this date, not null
source: https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html
Upvotes: 1