Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request removes the comparator operators from DateTime::Math, since they have now been internally implemented by Rakudo.
The problem was discovered based on this error from the test suite.
==> Testing DateTime::Math
Ambiguous call to 'infix:«>»'; these signatures all match:
:(DateTime:D \a, DateTime:D \b)
:(DateTime $a, DateTime $b)
in block at t/math.t line 27
Removing the comparators seemed the easiest solution. Now all test cases pass:
ok 1 - year changed correctly, add 1d
ok 2 - month changed correctly, add 1d
ok 3 - day changed correctly, add 1d
ok 4 - year changed correctly, subtract 1y
ok 5 - month changed correctly, subtract 1y
ok 6 - day changed correctly, subtract 1y
ok 7 - DateTime - DateTime
ok 8 - from-seconds to days
ok 9 - duration-to-from() works.
ok 10 - DateTime > DateTime
ok 11 - DateTime < DateTime
ok 12 - DateTime >= DateTime
ok 13 - DateTime <= DateTime
ok 14 - DateTime == DateTime
ok 15 - DateTime cmp DateTime
ok 16 - DateTime <=> DateTime
ok 17 - DateTime != DateTime