Hi,
The Interval class has no direct support for open ended intervals. You 
have three choices at present:
a) Code your own interval class that does support an open-ended interval
b) Have your bean hold separate start and end dates, and set the end 
date to null for open-ended
c) Use a far in the future date to indicate open-ended, such as 2099-12-3

The second is really a hack, and no different to the Y2K problems of 
course...

Personally, I use (b), as (c) is a hack, and Ive not needed to go as far 
as (a).

As for including the last day in the interval, this has been requested 
before, and may in fact be a bigger requirement than first thought.

Stephen


Michael Blumöhr wrote:
> Hello,
> 
> I recently discovered the joda time library. As another unhappy user 
> of the JDK date classes many ideas in joda time are really helpful.
> Now we are evaluating to use the joda time classes. That's why I have 
> some questions. Thank you for your answers in advance.
> 
> How do you handle an interval that is open in the future?
> Assume we have customers who have assigned addresses. Each assignment 
> has a period for which it is valid. Most of them has no time limit in 
> the future.
> 
> Such periods of validity are usually written with the beginning day 
> and the ending day. The end day is usually included. I would 
> appriciate I somebody have some hints how to handle this.
> 
> We are using Hibernate and I tested the Hibernate support which works 
> well. So I'm interested in the extension for the new classes I read 
> in the mailing list archives. If the programmer of these is 
> interested I will test them an will report bugs (if there are some ;-)
> 
> Michael
> 
> 
> 
> ++++++++++++++++++++++++++++++++++
> 
> Diese Email wurde elektronisch auf Viren ueberprueft! 
> 
> 
> +++++++++++++++++++++++++++++++++++
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Joda-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/joda-interest
> 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Joda-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to