在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:JodaOrg/joda-time开源软件地址:https://github.com/JodaOrg/joda-time开源编程语言:Java 99.7%开源软件介绍:Joda-TimeJoda-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 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. DocumentationVarious documentation is available:
ReleasesRelease 2.10.14 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.10.14</version>
</dependency> Gradle configuration: compile 'joda-time:joda-time:2.10.14' Related projectsRelated projects at GitHub:
Other related projects: For enterpriseAvailable 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. SupportPlease 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. Release process
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论