I don't know exactly ... do you think i can resolve my problem with an 
Interval? It's that I didn't manage to find something to compare my date and my 
period ... and also, how could I create an Interval instance 's object from my 
String period (like R/1997-10/P1Y) ?

Regards,

Jérôme Guermeur


________________________________
De : Rodrigo Canabrava [mailto:canab...@gmail.com]
Envoyé : mercredi 22 juillet 2009 15:26
À : Discussion of the Joda project
Objet : Re: [Joda-interest] [Period] How to validate if a Date is into a period

I think what you are looking for is an Interval, not a Period.

2009/7/22 Guermeur, Jerome 
<jerome.guerm...@capgemini.com<mailto:jerome.guerm...@capgemini.com>>

Hi,



I have a big problem with a Java application. I have to verify if a Date is 
into a period. The period is defined in ISO8601 format, so it could be 
something like:

 *   1997-10-01T00/2009-12-31T24:00
 *   R/1997-10/P1Y



So, I wonder how to realize this verification ... I think I have to use 
'Period' object in order to create an instance of Period from my ISO8601 date 
(with the PeriodFormatter object I think). But, then, I don't know how to 
verify if my Date is into this period ... I didn't see any method of Period 
class witch seems to do that.



Has someone got any idea to resolve this problem?



Best Regards,

___________________________________________
Jérôme Guermeur

Consultant

Capgemini Brest  / Pôle IFREMER

 Tel: +33-(0)2-98-33-32-35

[cid:image001.jpg@01CA0AE2.13210C20]

________________________________________



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.

------------------------------------------------------------------------------

_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net<mailto:Joda-interest@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/joda-interest

</PRE><p style="font-family:arial;color:grey" style="font-size:13px">This 
message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it 
is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any 
part thereof. If you receive this message in error, please notify the sender 
immediately and delete all copies of this message.</p><PRE>

<<inline: image001.jpg>>

------------------------------------------------------------------------------
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to