Loading ...
Sorry, an error occurred while loading the content.

Java library for handling dates and times, ISO 8601-based

Expand Messages
  • Aron Roberts
    This is to note the availability of a emerging third-party Java API (class library) for manipulating dates and times, currently at version 0.95:
    Message 1 of 6 , Feb 20, 2004
    • 0 Attachment
      This is to note the availability of a emerging third-party Java API
      (class library) for manipulating dates and times, currently at
      version 0.95:

      http://joda-time.sourceforge.net/

      From the description:

      >Joda-Time is an open-source project to provide a quality Java date
      >and time API.
      >
      >Date and Time handling is fundamental to many applications. However,
      >the classes supplied in Java have always been weak. Date should have
      >been immutable, like String. Instead, it has many deprecated
      >methods. Calendar makes accessing 'normal' dates difficult, due to
      >the lack of simple methods. Calendar also has some strange
      >performance characteristics.
      >
      >The Joda Dates project seeks to provide an implementation of dates
      >and times for the Java community. The 'default' calendar system
      >implemented will be the ISO8601 standard. This specifies a framework
      >for date and time independent of locale. Thus, in the standard, the
      >first day of the week is Monday, and this has the index 1. This
      >avoids any ambiguity across national boundaries.
      >
      >Additional calendar systems supported are Gregorian, Julian,
      >GregorianJulian (GJ) and Buddhist. The design is flexible and
      >pluggable, so adding additional calendar systems should be easy.

      FYI.

      Aron Roberts Workstation Software Support Group . 221 Evans Hall
      University of California, Berkeley, CA 94720-3808 USA
      aron@... . +1 510-642-5974 . fax 510-643-5385
    • hjwoudenberg@aol.com
      In a message dated 2/20/2004 3:34:13 PM Central Standard Time, aron@socrates.berkeley.edu writes: This is to note the availability of a emerging third-party
      Message 2 of 6 , Feb 21, 2004
      • 0 Attachment
        In a message dated 2/20/2004 3:34:13 PM Central Standard Time, aron@... writes:
        This is to note the availability of a emerging third-party Java API
        (class library) for manipulating dates and times, currently at
        version 0.95:

             http://joda-time.sourceforge.net/
        Look at this method and than consider the function approach.  Example of a function:
         
        to-date = DATEFUNCTION(.fr :from-date :.us.il)
         
        Will convert Illinois time to French time.  Daylight or standard time is determined by rules in a table, which can be changed. This is required because countries in eastern Europe are converting to the European time zones and rules.
         
        Herman
      • Tex Texin
        Hi, To me a domain ending in .il is Israeli. Maybe you mean .il.us? There are many reason to use an approach that is easily modifiable, such as being table
        Message 3 of 6 , Feb 21, 2004
        • 0 Attachment
          Hi,
          To me a domain ending in .il is Israeli. Maybe you mean .il.us?

          There are many reason to use an approach that is easily modifiable, such as
          being table driven, besides the Eastern Europe issue.
          Daylight savings rules vary locally (down to the city) and by special events.
          e.g. Sydney Australia changed its behavior during the 2000 Olympics.

          The hard part is insuring everyone is using the same table.

          Even something as simple as postal zipcode, when its changed, takes 5 years or
          more to get updated everywhere.
          (It happened to me. Computers would reject my transactions because one had
          either the old or new zip and another computer would do the opposite.)

          tex

          In a message dated 2/20/2004 3:34:13 PM Central Standard Time,
          aron@... writes:

          This is to note the availability of a emerging third-party Java API
          (class library) for manipulating dates and times, currently at
          version 0.95:

          http://joda-time.sourceforge.net/

          Look at this method and than consider the function approach. Example of a
          function:

          to-date = DATEFUNCTION(.fr :from-date :.us.il)

          Will convert Illinois time to French time. Daylight or standard time is
          determined by rules in a table, which can be changed. This is required because
          countries
          in eastern Europe are converting to the European time zones and rules.


          --
          -------------------------------------------------------------
          Tex Texin cell: +1 781 789 1898 mailto:Tex@...
          Xen Master http://www.i18nGuy.com

          XenCraft http://www.XenCraft.com
          Making e-Business Work Around the World
          -------------------------------------------------------------
        • Aron Roberts
          ... I m confused: does Herman s original comment about considering the function approach, above, have any pertinence to the JodaTime Java API at
          Message 4 of 6 , Feb 23, 2004
          • 0 Attachment
            >On Sat, 21 Feb 2004 11:02:42 EST, Herman <hjwoudenberg@...> wrote:
            >>In a message dated 2/20/2004 3:34:13 PM Central Standard Time,
            >>aron@... writes:
            >>This is to note the availability of a[n] emerging third-party Java API
            >>(class library) for manipulating dates and times, currently at
            >>version 0.95:
            >>
            >> http://joda-time.sourceforge.net/
            >
            >Look at this method and than consider the function approach. Example of a
            >function:
            >
            >to-date = DATEFUNCTION(.fr :from-date :.us.il)
            >
            >Will convert Illinois time to French time. Daylight or standard time is
            >determined by rules in a table, which can be changed. This is required because
            >countries in eastern Europe are converting to the European time
            >zones and rules.

            At 9:39 +0000 2004-02-22, Tex Texin <tex@...> replied:
            >To me a domain ending in .il is Israeli. Maybe you mean .il.us?
            >
            >There are many reason to use an approach that is easily modifiable, such as
            >being table driven, besides the Eastern Europe issue.
            >Daylight savings rules vary locally (down to the city) and by special events.
            >e.g. Sydney Australia changed its behavior during the 2000 Olympics.
            >
            >The hard part is insuring everyone is using the same table.

            I'm confused: does Herman's original comment about considering "the
            function approach," above, have any pertinence to the JodaTime Java
            API at <http://joda-time.sourceforge.net/>?

            From what I can tell from a quick glance, JodaTime uses the Olson
            ZoneInfo (aka 'zoneinfo' or 'tz') public domain timezone database:

            http://www.twinsun.com/tz/tz-link.htm

            JodaTime comes bundled with time zone information from the Olson
            ZoneInfo that has been compiled into an internal format used by the
            JodaTime library. JodaTime also provides methods for compiling
            updated versions of this database into its internal format, and for
            creating custom timezones:

            http://joda-time.sourceforge.net/apidocs/org/joda/time/tz/package-summary.html

            Aron Roberts Workstation Software Support Group . 221 Evans Hall
            University of California, Berkeley, CA 94720-3808 USA
            aron@... . +1 510-642-5974 . fax 510-643-5385
          • hjwoudenberg@aol.com
            In a message dated 2/23/2004 5:18:46 PM Central Standard Time, aron@socrates.berkeley.edu writes: I m confused: does Herman s original comment about
            Message 5 of 6 , Feb 23, 2004
            • 0 Attachment
              In a message dated 2/23/2004 5:18:46 PM Central Standard Time, aron@... writes:
              I'm confused: does Herman's original comment about considering "the
              function approach," above, have any pertinence to the JodaTime Java
              API at <http://joda-time.sourceforge.net/>?
              Do you think the Joda Time use is as easy as with the functional approach?
               
              Herman
            • Stephen Colebourne
              JodaTime: // current date in default locale/timezone DateTime dt = new DateTime(); // gets the timezone for Vienna using the Olsen data underneath DateTimeZone
              Message 6 of 6 , Feb 23, 2004
              • 0 Attachment
                JodaTime:

                // current date in default locale/timezone
                DateTime dt = new DateTime();
                // gets the timezone for Vienna using the Olsen data underneath
                DateTimeZone viennaZone = DateTimeZone.getInstance("Europe/Vienna");
                // convert the datetime returned before to that in a Vienna time zone
                DateTime timeVienna = dt.withTimeZone(viennaZone);
                // get the time
                int hour = timeVienna.getHourOfDay();
                int Minute = timeVienna.getMinuteOfHour();

                All the above will use the ISO8601 calendar calculation engine internally.
                Stephen

                ----- Original Message -----
                From: <hjwoudenberg@...>
                To: <ISO8601@yahoogroups.com>
                Sent: Monday, February 23, 2004 11:55 PM
                Subject: Re: [ISO8601] Re: Java library for handling dates and times, ISO
                8601-based


                > In a message dated 2/23/2004 5:18:46 PM Central Standard Time,
                > aron@... writes:
                > I'm confused: does Herman's original comment about considering "the
                > function approach," above, have any pertinence to the JodaTime Java
                > API at <http://joda-time.sourceforge.net/>?
                > Do you think the Joda Time use is as easy as with the functional approach?
                >
                > Herman
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.