Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Dayjs | 44,173 | 5,371 | 11,414 | 3 days ago | 122 | July 01, 2023 | 808 | mit | JavaScript | |
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API | ||||||||||
Date Fns | 32,359 | 68,280 | 11,158 | 3 days ago | 180 | April 30, 2023 | 628 | mit | TypeScript | |
⏳ Modern JavaScript date utility library ⌛️ | ||||||||||
Awesome Falsehood | 22,086 | 13 days ago | 4 | cc0-1.0 | ||||||
😱 Falsehoods Programmers Believe in | ||||||||||
Luxon | 14,260 | 1,936 | 3,121 | 14 days ago | 139 | March 04, 2023 | 144 | mit | JavaScript | |
⏱ A library for working with dates and times in JS | ||||||||||
Arrow | 8,372 | 3,711 | 1,031 | a day ago | 63 | September 03, 2022 | 97 | apache-2.0 | Python | |
🏹 Better dates & times for Python | ||||||||||
Pickadate.js | 7,727 | 172 | 38 | 3 months ago | 18 | May 31, 2019 | 311 | mit | JavaScript | |
The mobile-friendly, responsive, and lightweight jQuery date & time input picker. | ||||||||||
Datetools | 7,089 | 663 | 3 years ago | 13 | September 28, 2017 | 118 | mit | Objective-C | ||
Dates and times made easy in iOS | ||||||||||
Pendulum | 5,711 | 540 | 662 | a day ago | 53 | November 23, 2022 | 229 | mit | Python | |
Python datetimes made easy | ||||||||||
Joda Time | 4,936 | 31,269 | 5,883 | 14 days ago | 58 | March 30, 2023 | 44 | apache-2.0 | Java | |
Joda-Time is the widely used replacement for the Java date and time classes prior to Java SE 8. | ||||||||||
Carbon | 3,479 | 36 | 5 days ago | 112 | November 06, 2022 | 3 | mit | Go | ||
A simple, semantic and developer-friendly golang package for datetime |
Joda-Time provides a quality replacement for the Java date and time classes. The design allows for multiple calendar systems, while still providing a simple API. The 'default' calendar is the ISO8601 standard which is used by XML. The Gregorian, Julian, Buddhist, Coptic, Ethiopic and Islamic systems are also included. Supporting classes include time zone, duration, format and parsing.
Joda-time is no longer in active development except to keep timezone data up to date.
From Java SE 8 onwards, users are asked to migrate to java.time
(JSR-310) - a core part of the JDK which replaces this project.
For Android users, java.time
is added in API 26+.
Projects needing to support lower API levels can use the ThreeTenABP library.
As a flavour of Joda-Time, here's some example code:
public boolean isAfterPayDay(DateTime datetime) {
if (datetime.getMonthOfYear() == 2) { // February is month 2!!
return datetime.getDayOfMonth() > 26;
}
return datetime.getDayOfMonth() > 28;
}
public Days daysToNewYear(LocalDate fromDate) {
LocalDate newYear = fromDate.plusYears(1).withDayOfYear(1);
return Days.daysBetween(fromDate, newYear);
}
public boolean isRentalOverdue(DateTime datetimeRented) {
Period rentalPeriod = new Period().withDays(2).withHours(12);
return datetimeRented.plus(rentalPeriod).isBeforeNow();
}
public String getBirthMonthText(LocalDate dateOfBirth) {
return dateOfBirth.monthOfYear().getAsText(Locale.ENGLISH);
}
Joda-Time is licensed under the business-friendly Apache 2.0 licence.
Various documentation is available:
Release 2.12.5 is the current latest release. This release is considered stable and worthy of the 2.x tag. It depends on JDK 1.5 or later.
Available in the Maven Central repository
Maven configuration:
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.12.5</version>
</dependency>
Gradle configuration:
compile 'joda-time:joda-time:2.12.5'
Related projects at GitHub:
Other related projects:
Available as part of the Tidelift Subscription.
Joda and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.
If you want the flexibility of open source and the confidence of commercial-grade software, this is for you.
Please use Stack Overflow for general usage questions. GitHub issues and pull requests should be used when you want to help advance the project.
Any donations to support the project are accepted via OpenCollective.
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Joda-Time is developed using standard GitHub tools.
A checkstyle file is available, and PRs must comply with it.
The project can be built using Apache Maven, such as mvn clean install
.
Continuous Integration takes place using GitHub Actions.
Units tests are written in JUnit and run as part of the build and continuous integration.
Changes via PR must include appropiate test coverage.
Note that Joda-Time is considered to be a largely finished project. No major enhancements are planned. If using Java SE 8, please migrate to java.time (JSR-310).
mvn clean deploy -Doss.repo -Dgpg.passphrase=""