in reply to Re^3: DateTime::Span intersection inconsistencies
in thread DateTime::Span intersection inconsistencies
There's no problem with test #2 because the docs clearly show one should use before instead of end if you want test #2 to be consistent with test #5.
Agreed. The inconsistency arises when looking only at the times, and ignoring the open or closed state of the spans -- that was my mistake.
The problem arose when creating recurring start and end sets, and turning them into spans with DateTime::SpanSet. Its docs don't mention that the from_set_and_duration method creates open spans, so that's where my confusion began! Alas, its from_sets method also creates open spans.
Now that I know, it's not really a problem. But I'm still curious to know why open spans are created by default -- there doesn't appear to be a way to change this, and perhaps for good reason.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: DateTime::Span intersection inconsistencies
by ikegami (Patriarch) on Jun 30, 2011 at 17:47 UTC |