Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for inequality with relative times #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkutil
Copy link
Contributor

@bkutil bkutil commented Mar 22, 2024

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 5810dcc and when it possibly became an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant