I rather think like @Hugo that your research efforts could have been better.
Does Java-8/9 support the Julian calendar?
Research method: Please study the official API.
The count of chronologies in OpenJDK is limited to just five (see the mentioned implementations). No chronology (ISO as proleptic gregorian, Hijri-Umalquara, Minguo, ThaiBuddhist, Japanese) supports the Julian calendar. Hence the simple answer is: No chance to convert to Julian calendar only using the Java-8/9-API.
Does Oracle plan to implement the Julian calendar?
Research method: Google query.
A simple search using Google with the keywords "openjdk julian calendar" shows as first link following issue:
The Julian calendar system was the primary calendar system in use
before the current Gregorian/ISO one. Because of its widespread
historic use, especially in the history/academic domain, the JDK
should support it.
An implementation is available at ThreeTen-Extra. Note that this
issue does not call for a calendar that can "cutover" between the
Julian and Gregorian.
This issue was submitted by the primary author of new java.time-API S. Colebourne already in year 2015. Oracle had got a lot of time to add the suggested finished implementation to Java-9, but missed it. Regarding the fact that Oracle has refused some other calendar systems (like Persian or Hebrew) or even thrown out existing chronologies (like Coptic which had been a part of OpenJDK-8 before release), I would not be very sure if Oracle is really going to add the Julian calendar to a later Java-version in context of java.time
-API. Let's see.
Can we use other 3rd-party libraries to convert java.time.LocalDate
?
Research method: Google query.
A simple search using Google with the keywords "java julian calendar" show tons of possible solutions. Just have some patience to study at least the links of about first 10 search result pages:
Yes, we can.
If you are willing or know how to convert java.time.LocalDate
to java.util.GregorianCalendar
(tip: Use timezone to convert first to ZonedDateTime
and then to old API): Set the gregorian cutover date to new Date(Long.MAX_VALUE)
.
Or use Joda-Time: It offers a Julian chronology. Conversion example:
LocalDate threeten = LocalDate.now();
org.joda.time.LocalDate joda =
new DateTime(
threeten.getYear(),
threeten.getMonthValue(),
threeten.getDayOfMonth(),
0,
0
).withChronology(JulianChronology.getInstance()).toLocalDate();
LocalDate threeten = LocalDate.now();
JulianCalendar jcal = PlainDate.from(threeten).transform(JulianCalendar.axis());