Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
564 captures
04 Jan 2004 - 28 Jun 2025
OctDECJan
Previous capture03Next capture
201020112013
success
fail
COLLECTED BY
Organization:Alexa Crawls
Starting in 1996,Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to theWayback Machine after an embargo period.
Collection:Alexa Crawls
Starting in 1996,Alexa Internet has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to theWayback Machine after an embargo period.
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20111203213457/http://joda-time.sourceforge.net:80/
Joda.org Joda-Time

Version: 2.1.alpha
Joda-Time |JSP tags |Hibernate |I18N

Joda Time
Key concepts
Chronologies
Development
Joda
Project Documentation
Website
Sourceforge
Last Published: 2011-10-25

Joda Time - Java date and time API

Joda-Time provides a quality replacement for the Javadateandtime classes. The design allows for multiplecalendarsystems, while still providing a simple API.The 'default' calendar is theISO8601 standard whichis used by XML. The Gregorian, Julian, Buddhist, Coptic, Ethiopic and Islamic systemsare also included, and we welcome further additions. Supporting classes includetime zone, duration, format and parsing.

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;}publicDays daysToNewYear(LocalDate fromDate) {LocalDate newYear = fromDate.plusYears(1).withDayOfYear(1);  returnDays.daysBetween(fromDate, newYear);}public boolean isRentalOverdue(DateTime datetimeRented) {Period rentalPeriod = newPeriod().withDays(2).withHours(12);  return datetimeRented.plus(rentalPeriod).isBeforeNow();}public String getBirthMonthText(LocalDate dateOfBirth) {  return dateOfBirth.monthOfYear().getAsText(Locale.ENGLISH);}
Version 2.0 was released on 2011-07-31 -Download now

Why Joda Time?

Joda-Time has been created to radically change date and time handling in Java.The JDK classes Date and Calendar are very badly designed, have had numerous bugsand have odd performance effects.Here are some of our reasons for developing and using Joda-Time:

  • Easy to Use.Calendar makes accessing 'normal' dates difficult, due to the lack of simple methods.Joda-Time has straightforwardfield accessors such asgetYear() orgetDayOfWeek().
  • Easy to Extend.The JDK supports multiple calendar systems via subclasses ofCalendar.This is clunky, and in practice it is very difficult to write another calendar system.Joda-Time supports multiple calendar systems via a pluggable system based on theChronology class.
  • Comprehensive Feature Set.The library is intended to provide all the functionality that is required for date-timecalculations. It already provides out-of-the-box features, such as support for oddballdate formats, which are difficult to replicate with the JDK.
  • Up-to-date Time Zone calculations.Thetime zone implementation is based onthe publictz database, which isupdated several times a year. New Joda-Time releases incorporate all changesmade to this database. Should the changes be needed earlier,manually updating the zone data is easy.
  • Calendar support.The library currently provides 8 calendar systems. More will be added in the future.
  • Easy interoperability.The library internally uses a millisecond instant which is identical to the JDK and similarto other common time representations. This makes interoperability easy, and Joda-Time comeswith out-of-the-box JDK interoperability.
  • Better Performance Characteristics.Calendar has strange performance characteristics as it recalculates fields at unexpected moments.Joda-Time does only the minimal calculation for the field that is being accessed.
  • Good Test Coverage.Joda-Time has a comprehensive set of developer tests, providing assurance of the library's quality.
  • Complete Documentation.There is a fullUser Guide which provides an overview and coverscommon usage scenarios. Thejavadocis extremely detailed and covers the rest of the API.
  • Maturity.The library has been under active development since 2002.Although it continues to be improved with the addition of new features andbug-fixes, it is a mature and reliable code base.A number ofrelated projects are now available.
  • Open Source.Joda-Time is licenced under the business friendlyApache License Version 2.0.

Documentation

Various documentation is available:

Releases

Release 2.0is the current latest release.This release is an evolution of the 1.x codebase, not a major rewrite.It is considered stable and worthy of the 2.x tag.

Version 2.0 is almost completely source and binary compatible with version 1.x.Key changes include the use of JDK 1.5 or later, generics, and the removal of some (but not all)deprecated methods. See theupgrade notes for full detailsincluding information on the corner cases that are not compatible.Applications should be able to drop version 2.0 in place of an earlier version without any issuesproviding they are using JDK 1.5 or later and are not using one of the deprecated methods.Please let us know if a corner case hits you, especially if Joda-Time is a dependency of anotheropen source project.

We will support the 2.x product line using standard Java mechanisms.The main public API will remain backwards compatible for both source and binary in the 2.x stream.The version number will change to 3.0 to indicate a significant change in compatibility.

Release 1.6.2is the previous release.It is compatible with JDK 1.4.Given that v2.0 is essentially compatible with v1.6.2, there are no current plans for furtherreleases in the v1.x product line.

Support

Support on bugs, library usage or enhancement requests is available via:

  • the joda-interestmailing list. Due to spam, you must be subscribed to post to the mailing list.
  • the joda-time sourceforgeforum.

Copyright © 2002-2011Joda.org. All Rights Reserved.


[8]ページ先頭

©2009-2025 Movatter.jp