Module structure
Time4J is organized in modules. The base-module is mandatory and contains following public (exported) packages:
- net.time4j - main package containing the basic types and duration-related classes
- net.time4j.base - elementary interfaces for the gregorian calendar and the UNIX-time
- net.time4j.calendar - alternative non-gregorian calendars
- net.time4j.calendar.astro - astronomical calculations for sun or moon
- net.time4j.calendar.bahai - the Badi calendar
- net.time4j.calendar.frenchrev - the French revolutionary calendar
- net.time4j.calendar.hindu - the Hindu calendar
- net.time4j.clock - offers alternative clocks
- net.time4j.engine - the rule engine of Time4J
- net.time4j.format - abstract facade for formatting and parsing of chronological entities
- net.time4j.format.expert - contains the expert-level format- and parse engine of Time4J
- net.time4j.format.platform - contains special formatters which use platform-specific resources
- net.time4j.history - support for the historical ancestors of modern ISO-8601-standard
- net.time4j.range - contains various interval classes including formatting
- net.time4j.scale - contains tools around technical time scales and leap seconds
- net.time4j.tz - represents a common facade for underlying timezone implementations
- net.time4j.tz.model - the foundation of all zone providers for historized timezone data
- net.time4j.tz.olson - offers enums as timezone ids and enables parsing of localized timezone names
- net.time4j.tz.other - other timezone extras like military or windows timezones
There are some extra modules which are optional and require the base-module. The term "optional" means that you can leave out these modules from classpath or module path if not used in your app.
The sqlxml-module offers adapters for JDBC and XML:
- net.time4j.sql - offers a bridge to SQL-types in JDBC
- net.time4j.xml - offers a bridge to XML
The tzdata-module represents an independent timezone repository based on the TZDB of IANA and overrides the timezone data of the JDK (if the JDK-version is not newer).
The ui-module contains a graphical calendar chooser for JavaFX.
The tool-module consists of the package net.time4j.tool and is only relevant for the creation and compilation of resources for Time4J. It also contains the timezone repository compiler. Standard applications have no need for this module in most cases.