At the moment there are basic equal, less-than or greater-than comparison operators that perform simple comparisons. However, each EDTFObject can potentially be a fuzzy, discontinuous range of dates. We can't currently use them for much more than bounding-box calculations.
It would be useful to be able to test a date such as date(1963, 01, 17) against the EDTFObject such as '[1962, 1964] and have it return False, since the date is not in the (discontinuous) range specified.
Something like:
>>> e = parse_edtf("[1962, 1964]")
>>> f = parse_edtf("1963")
>>> f in e
False
>>> f not in e
True
>>> g = parse_edtf("1962-08-28/1963-08-27")
>>> g in e # f is not wholly contained in e
False
>>> g.overlaps(e)
1 # overlaps the end
>>> e.overlaps(g)
-1 # overlaps the beginning
At the moment there are basic equal, less-than or greater-than comparison operators that perform simple comparisons. However, each
EDTFObject
can potentially be a fuzzy, discontinuous range of dates. We can't currently use them for much more than bounding-box calculations.It would be useful to be able to test a date such as
date(1963, 01, 17)
against the EDTFObject such as'[1962, 1964]
and have it returnFalse
, since the date is not in the (discontinuous) range specified.Something like:
etc.