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

It's not clear how to compare Durations (please improve documentation?) #2740

Open
cvbge opened this issue Oct 5, 2024 · 0 comments
Open

Comments

@cvbge
Copy link

cvbge commented Oct 5, 2024

Hi,

How can I compare two Durations? I want to know if one is larger (longer) than the other.

I've read about Duration, dayjs#diff, Is Before, but it's not clear from documentation which api should work.

  • Duration has no documentation/function/example, can I simply use '<' operator?
  • It's not clear if dayjs#diff works with Duration
  • Is Before does not seem to be appropriate way to check Durations because they do not have "before/after" meaning

Thanks

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

No branches or pull requests

1 participant