It's not clear how to compare Durations (please improve documentation?)
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Research direction
Start by reviewing the existing documentation for Duration, dayjs#diff, and Is Before, then check the API behavior for comparing two Durations. Document the supported comparison approach with a clear example and explain whether the other APIs apply; the issue is complete when a reader can determine which method to use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100