Time4J
ThreeTen-Extra
Time4J | ThreeTen-Extra | |
---|---|---|
1 | 3 | |
422 | 386 | |
- | 0.0% | |
7.7 | 6.5 | |
3 months ago | 12 days ago | |
Java | Java | |
GNU Lesser General Public License v3.0 only | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Time4J
-
ISO 8601: the better date format
ISO 8601 contains durations and time intervals which are totally undervalued! (https://en.wikipedia.org/wiki/ISO_8601#Time_intervals)
E.g.: 2021-05-01T12:00:00Z/P2H
They are so convenient. Every tried to store a tuple of datetimes to model a time interval? E.g. a meeting that takes place on 2021-05-01T12:00:00Z and takes two hours. Don't store it as two datetimes! Store it as an interval: "2021-05-01T12:00:00Z/P2H"
Or are you creating an API where a duration or a time interval is expected? E.g. "give me all sales in this time period..."
Please use time intervals for that. For JVM developers, there is a library out there that has amazing support: https://github.com/MenoData/Time4J
For python developers, there is pendulum which supports most of the functionality.
ThreeTen-Extra
-
How to Effectively Test Time-Dependent Code: Unit and Spring-Based Strategies
The https://www.threeten.org/threeten-extra/ library also has a mutable Clock, along with other useful time-related utilities.
- The Java date/time library's a mess.
-
What is the main purpose of the new interface java.time.InstantSource?
See this issue in the threeten-extra library: https://github.com/ThreeTen/threeten-extra/issues/150
What are some alternatives?
iCal4j - A Java library for parsing and building iCalendar data models
Joda-Time - Joda-Time is the widely used replacement for the Java date and time classes prior to Java SE 8.
Almanac Converter - A Java-based calendar converter
ThreeTenBP - Backport of functionality based on JSR-310 to Java SE 6 and 7. This is NOT an implementation of JSR-310.
glibc - GNU Libc
ThreeTen Android Backport - An adaptation of the JSR-310 backport for Android.
concise-encoding - The secure data format for a modern world