A highly customized lunar calendar system inspired by the Chaldean calendar but modified significantly to suit modern use cases. This project extends Java's Calendar class, providing an alternative lunar-based timekeeping system.
This calendar system is not a traditional Chaldean calendar anymore due to multiple deviations from its historical base. Instead, it provides a modernized lunar-based alternative with custom month and year calculations.
- Lunar-based months: Each month aligns with lunations rather than fixed days.
- Custom year calculations: Derived from lunation cycles rather than a solar year.
- Extended
Calendarclass: Works seamlessly with existing Java date utilities. - Support for arithmetic operations:
add()androll()behave predictably within the lunar system. - Efficient date conversions: Converts between Julian Days (JD) and internal time representation.
- Deviation from Chaldean rules: Adjusted for usability and consistency.
- Field computation logic:
computeTime(): Converts calendar fields to epoch time.computeFields(): Converts epoch time back into calendar fields.
- Handling of
roll()andadd():roll()keeps larger fields unchanged (e.g., rolling the day won't affect the month).add()properly adjusts larger fields when needed.
- Avoiding unnecessary recomputation:
- Flags like
areFieldsSetandareAllFieldsSetensure minimal recalculations.
- Flags like
- Integration with existing Java utilities: Compatible with
DateFormatand other Java time classes.
- Clone the repository:
git clone https://github.com/YOUR-ORG/YOUR-REPO.git cd YOUR-REPO - Build the project:
./gradlew build
We welcome contributions! To contribute:
- Fork the repository on GitHub.
- Create a new branch for your feature or bugfix:
- Submit a pull request with detailed changes.