43Re: ISO8601 parser/formatter for Java
- Mar 3, 2000In the message "ISO8601 parser/formatter for Java", dated 2000-03-02,
Craig Pratt <pratt@...> wrote:
>I have not been able to find a package/class for Java that contains aIn a search of the Google Internet search engine today, the closest
>parser that can parse a 8601 date/time string.
>The Java SimpleDateFormat will allow you to specify a particular
>format - but not one that recognizes the various 8601 formats. e.g.
>parse "2000-03-01T01:00:00", "2000-03-01", "20000
>301T01:00:00-09:00", etc. without basically doing a complete
>Anyone know of a Java class for this? I can't be the first person to
>run into this.
I was able to come -- at least in 10 minutes of searching -- are the
Java classes "hplb.misc.Time" and "hplb.util.Cal", described at:
and which are cached, respectively, by Google at:
These classes include methods for generating ISO 8601 date or
date/time strings from other time/date values.
This does not solve Craig's problem of finding a Java class that
contains methods for parsing the various ISO 8601 date/time formats
in a text string. Nonetheless, it's possible that the author of
these classes, Anders Kristensen, might have developed other parsing
routines, as well.
(This UK-based site was unreachable today, so it was somewhat
awkward to view its pages via the Google cache, including the full
list of classes and interfaces on this site at
As an alternative, the "Date::Manip" module for Perl includes a
flexible parsing routine that handles a variety of ISO 8601 dates,
If this routine comes with full Perl source, this might serve as
handy pseudo-code for someone developing Java methods to parse ISO
8601 strings. (If the Perl source makes use of regular expressions,
then the equivalent regex capabilities would obviously need to be
present in the Java environment. Unfortunately, I know very little
about Java ...)
Aron Roberts Workstation Software Support Group . 221 Evans Hall
University of California, Berkeley, CA 94720-3808 USA
aron@... . (510) 642-5974 . fax (510) 643-5385
- << Previous post in topic