users@jaxb.java.net

Re: Better xs:duration support?

From: Craig Raw <craig_at_quirk.co.za>
Date: Wed, 16 Jul 2003 11:55:36 +0200

Hi,

I am using a custom Duration utility class to handle duration strings
once they have been unmarshalled. Basically, it contains a method

public static Duration parseDuration( String str ) throws ParseException

to parse a duration string, and performing conversion to year, month,
day etc. fields with an accessor for the long value as well. Mail me if
it would be of help.

Craig

craig_at_quirk.co.za


-----Original Message-----
From: Discussion list for the Java Architecture for XML Binding
[mailto:JAXB-INTEREST_at_JAVA.SUN.COM] On Behalf Of Kohsuke Kawaguchi
Sent: 16 July 2003 03:05 AM
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: Re: Better xs:duration support?


Gary Gregory <ggregory_at_seagullsw.com> wrote:
> Hi K,
>
> Well, I /was/ planning on using an xs:duration attribute to specific a

> time out for one of our long lived component, where seconds is just
> fine as the level of granularity and quite easier to read than a
> milliseconds number.

OK. So essentially you are just interested in the time span in terms of
some fixed measure. Thank you for the input.

BTW, what's your plan if you see "1 month"? How many seconds should be
one month?


regards,
--
Kohsuke Kawaguchi                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com