This is the Java Reference Implementation of The Lukashian Calendar, a calendar that is exceptionally simple, highly accurate and radically different. It provides a universal mechanism for every planet, moon or space station that we'll ever inhabit and is perfect for the upcoming Mars Settlement.
For the artifacts, please visit the Maven Central.
For more information on the calendar mechanism itself, please visit lukashian.org.
Using the Lukashian Calendar is easy. First, add the most recent version of the jar file
as a dependency. Then, you can simply use the org.lukashian.Instant, org.lukashian.Day and org.lukashian.Year classes like you're used to. For example, to
get the current time, use Instant.now(). Please see the Javadoc for full documentation on
these classes.
Use the org.lukashian.Formatter class to format Instants, Days and Years. Please see the Javadoc
for all available formatting options.
By default, the Lukashian Calendar uses the instance for Planet Earth. However, because the Lukashian Calendar mechanism makes no assumptions about how long days and years are, or how many days a year should have, it works universally for every planet, moon or space station. In addition to the instance for Planet Earth, an instance for Planet Mars is available as well.
Using a different calendar instance can be done in one of two ways. First, you could use the instantiators of Instant, Day and Year that take
a calendar key as a parameter (for example, the of, ofEpoch or now methods). For the various calendar keys that are available, please see CalendarKeys.
For example, to instantiate the current Instant on Planet Mars, use Instant.now(CalendarKeys.MARS).
The second way to use a different calendar instance, is to set the default calendar instance to a different value. Calling
MillisecondStore.store().setDefaultCalendarKey(CalendarKeys.MARS) will cause all subsequent instantiatiors of Instant, Day and Year that
don't explicitly specify a calendar key, to use the instance of Planet Mars.
It is also possible to create your own calendar instance. Please see the Javadoc of the
MillisecondStore and MillisecondStoreDataProvider classes for more details.
In order to facilitate central maintenance and governance of the official numbers that define an instance of the Lukashian Calendar, the
ExternalResourceMillisecondStoreDataProvider can load instances from external resources.
The FileMillisecondStoreDataProvider and HttpMillisecondStoreDataProvider provide functionality for loading instances via files or HTTP URL's,
respectively. The StandardEarthHttpMillisecondStoreDataProvider and StandardMarsHttpMillisecondStoreDataProvider load the instance for Planet Earth
or Planet Mars directly from the official lukashian.org server.
Please see the Javadoc for full documentation on these classes.
Because of this external loading mechanism, ports of the Lukashian Calendar in other programming languages only need to port the ExternalResourceMillisecondStoreDataProvider
and its subclasses, not the implementations of MillisecondStoreDataProvider that perform the actual calculations, as the results of these calculations will also
be loadable from the official lukashian.org server.
Please refer to the Maven Central for the release date and artifacts of each version.
- Added various parameter validation checks in the code
- Registering a MillisecondStoreDataProvider under a certain key now clears the previously stored data for that key
- Conversion of an Instant that takes place during a UNIX leap second from one calendar instance to another is no longer affected by said leap second
- Improved Javadoc documentation
- Improved Equation of Time calculation of Earth instance (
StandardEarthMillisecondStoreDataProvider)
- Revamped the
MillisecondStoremechanism, enabling the usage of multiple simultaneous implementations ofMillisecondStoreDataProvider - Added a calendar instance for Planet Mars, via
StandardMarsMillisecondStoreDataProviderandStandardMarsHttpMillisecondStoreDataProvider - Added additional
Formatter.format()methods - Switched from Java 21 LTS to Java 25 LTS
- Updated versions of dependencies
- Added method
Day.getLengthOfBeepInMilliseconds() - Added mechanism for loading instances of the Lukashian Calendar from external resources, specifically, the
ExternalResourceMillisecondStoreDataProvider,FileMillisecondStoreDataProvider,HttpMillisecondStoreDataProviderandStandardEarthHttpMillisecondStoreDataProviderclasses
- Improved Javadoc documentation
- Updated versions of dependencies
- Created this changelog
- Added methods
Day.plusYears(),Day.minusYears(),Instant.plusYears()andInstant.minusYears() - Added methods
Year.containsNot(),Day.containsNot(),Day.isNotIn(),Instant.isNotIn() - Added method
MillisecondStore.setMillisecondStoreDataProvider()that allows changing theMillisecondStoreDataProvideron the fly - Switched from
java.lang.BigDecimaltoorg.apache.commons.numbers.fraction.BigFractionforInstantcalculations, becauseBigDecimaldid not provide the required accuracy - Switched from Java 17 LTS to Java 21 LTS
- Various small improvements and optimizations
- The Lukashian Calendar did not maintain a changelog on GitHub yet...