Title: RE: [castor-dev] recurringDuration

Sorry, attached the wrong file.

 

 

-----Original Message-----
From: Brian Dobby [mailto:[EMAIL PROTECTED]]
Sent: 30 July 2001 15:39
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] recurringDuration

 

Hi, Arnaud.
       
I still had trouble with this, so I attach a version that works for me; maybe you could look it over & see if it would be ok for general use.

BTW: The guys at ISO must be nuts to define a standard where, for example, '-' means three different things!
       
Regards
               
Brian
<<RecurringDurationBase.java>>

 -----Original Message-----
From:   Arnaud Blandin [mailto:[EMAIL PROTECTED]]
Sent:   14 May 2001 21:47
To:     [EMAIL PROTECTED]
Subject:        Re: [castor-dev] recurringDuration

Hi Brian,

1 - Omitting higher components by using the '-' character was not supported in the
recurringDuration implementation. This feature is now in the CVS.

2 - RecurringDuration x = new RecurringDuration();
    x.setDuration(new TimeDuration(0));
    x.setPeriod("PT0H1M");
    x.toString();
the toString will return a String that represents the lexical representation of
the recurringDuration defined (i.e 0000-00-00T00:00:00.0) here) and is not taking
care of the duration of period.
To access the facets you can use the getPeriod and getDuration methods.

Hope this helps,
Arnaud

-----Original Message-----
From: Brian Dobby [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 8:57 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] recurringDuration

 

Hi,
        I'm having problems trying to use the RecurringDuration class. All I'm trying to do is load a RecurringDuration using RecurringDuration.parseRecurring(), serialize it to a String which can be re-parsed, and access the Period facet as a java.util.Date. Should I be able to do this, or have I completely misunderstood the purpose and/or operation of the class?

I tried to parse the String "--05-31T13:20:00", which according to the W3C Schema Primer [http://www1.xml.net.cn/standard/WD-xmlschema-0-20000407.htm]  should represent "May 31st every year at 1.20pm Co-Ordinated Universal Time", but the String was rejected because "year cannot be zero".

If I construct a recurringDuration and initialize its Duration and Period thus:
                RecurringDuration x = new RecurringDuration();
                x.setDuration(new TimeDuration(0));
                x.setPeriod("PT0H1M");
                x.toString();
then toString() serializes only the Duration, not the Period.
Any idea what I'm doing wrong here?
        TIA
                Brian
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.250 / Virus Database: 123 - Release Date: 18/04/2001

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
       
unsubscribe castor-dev
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.250 / Virus Database: 123 - Release Date: 18/04/2001

 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.264 / Virus Database: 136 - Release Date: 02/07/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.264 / Virus Database: 136 - Release Date: 02/07/2001

RecurringDuration.java

Reply via email to