Claudio Nieder wrote: >> but that would imply that [11:00, 12:00) (or any other non-empty >>interval) would contain [9:00, 9:00) (and _every_ other empty interval). >>intuitively that doesn't sound correct. > > > Intuitively maybe, but keep in mind, that [9:00,9:00) does not define any > point in time, because it contains all points in time which fullfill the > condition: > > 9:00<=t && t<9:00 > > There is no time t which can satisfy this condition, not even 9:00 itself, as > 9:00 is never strictly less than 9:00. > > Thus though your intuition makes you think this Interval has anything to do > with 9 o'clock it actually doesn't as it does not contain 9 o'clock. In fact > [9:00,9:00) is the very same as [11:00,11:00) or [12:00,12:00) or any other > empty Interval.
We have the following operations to define: - contains - abuts - overlaps - overlap (the amount of overlap of two intervals) - gap (the gap between two intervals) a = [08:00,09:00) b = [09:00,09:00) c = [09:00,10:00) One option is to define an empty interval as returning false to the first three and null to the last two: - a abuts c - neither a or c abut or contain b But what does the interval start/end datetime represent in this case? A second non-maths option is to make the empty interval lie between two real intervals: - a, b and c all abut each other at 09:00 - neither a nor c contains b A third option is to define the empty interval as a point on the timeline at 09:00 that is therefore contained in c: - a, b and c all abut each other at 09:00 - c contains b, thus b and c overlap Stephen 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
