note potentially useful interval algebra link
This commit is contained in:
parent
d0461c3ef7
commit
6af5e6fe06
@ -119,6 +119,8 @@ spanStart (DateSpan d _) = d
|
|||||||
spanEnd :: DateSpan -> Maybe Day
|
spanEnd :: DateSpan -> Maybe Day
|
||||||
spanEnd (DateSpan _ d) = d
|
spanEnd (DateSpan _ d) = d
|
||||||
|
|
||||||
|
-- might be useful later: http://en.wikipedia.org/wiki/Allen%27s_interval_algebra
|
||||||
|
|
||||||
-- | Get overall span enclosing multiple sequentially ordered spans.
|
-- | Get overall span enclosing multiple sequentially ordered spans.
|
||||||
spansSpan :: [DateSpan] -> DateSpan
|
spansSpan :: [DateSpan] -> DateSpan
|
||||||
spansSpan spans = DateSpan (maybe Nothing spanStart $ headMay spans) (maybe Nothing spanEnd $ lastMay spans)
|
spansSpan spans = DateSpan (maybe Nothing spanStart $ headMay spans) (maybe Nothing spanEnd $ lastMay spans)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user