Advanced Java date/time library with extensive calendar support, astronomy features, and superior internationalization.
Time4J is an advanced Java library for date, time, interval, and calendar operations, designed as a complete replacement for legacy Java date/time classes and alternatives like Joda-Time and JSR-310. It solves complex temporal problems with features like leap second support, extensive calendar systems, and superior internationalization for both business and scientific applications.
Java developers needing robust date/time handling, especially those working with multiple calendar systems, scientific applications requiring leap second accuracy, or projects demanding extensive internationalization beyond standard libraries.
Developers choose Time4J for its comprehensive feature set, type-safe API, explicit design philosophy, and support for over 20 calendars and 95 languages—filling gaps left by JSR-310 and other libraries while maintaining interoperability with java.time.
Advanced date, time and interval library for Java with sun/moon-astronomy and calendars like Chinese, Coptic, Ethiopian, French Republican, Hebrew, Hijri, Historic Christian, Indian National, Japanese, Julian, Korean, Minguo, Persian, Thai, Vietnamese
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports over 20 calendars including Chinese, Hebrew, and Persian, as listed in the README, enabling accurate historical and international date handling beyond standard Gregorian.
Provides precise UTC leap second support and astronomy calculations like sun/moon positions, essential for scientific applications where time scale accuracy is critical.
Emphasizes compile-time safety and requires explicit locale/timezone specifications, preventing errors like adding clock units to dates, as highlighted in the design remarks.
Offers high-performance parsing and formatting with extensive customization options, outperforming Joda-Time and JSR-310 in parsing speed according to the README.
Includes built-in resources for 95 languages with localized duration formatting, filling gaps left by platform resources, as stated in the internationalization section.
Requires managing multiple modules (e.g., time4j-base, time4j-tzdata) and initialization steps like TZDATA.init() for Java 9+, adding overhead compared to simpler libraries.
The element-centric manipulation and explicit APIs are more verbose and conceptually dense, making it harder to adopt quickly than JSR-310's more intuitive design.
Has a smaller user base and fewer third-party integrations compared to standard Java libraries like java.time, which can affect support and tooling availability.
The README notes that older version lines v1.x and v2.x are not recommended due to backward incompatibilities, indicating a history of instability in earlier releases.
Time4J is an open-source alternative to the following products:
java.time (JSR-310) is the modern date and time API introduced in Java 8, providing comprehensive classes for date, time, and duration manipulation.
Joda-Time is a widely used date and time library for Java, providing a comprehensive set of classes for date and time manipulation before being largely superseded by java.time in Java 8.