These tests demonstrate what seems to be an issue w/ relative DateTime and gt.
def gt(value)
super parse(value).last
end
gt is overridden for DateTime - with relative timestamps, last - the end of the range will be Time.now, so comparing to it will fail.
gteq, which works, comes from a dynamic definition in Base class and calls map:
def map(value)
parse(value).first
end
So perhaps the fix would be to get rid of gt override? But TBH, I don't have enough context for why it was introduced in 5810dccb2a09217637ed7a2329781d6e5d481d3d and when it possibly became an issue.
These tests demonstrate what seems to be an issue w/ relative DateTime and
gt
.gt
is overridden for DateTime - with relative timestamps,last
- the end of the range will beTime.now
, so comparing to it will fail.gteq
, which works, comes from a dynamic definition inBase
class and callsmap
:So perhaps the fix would be to get rid of
gt
override? But TBH, I don't have enough context for why it was introduced in 5810dccb2a09217637ed7a2329781d6e5d481d3d and when it possibly became an issue.