iamkun / iamkun/dayjs

Unexpected result while using duration.toISOString()

Open
#2,181 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
11491200 seconds = 19 weeks. Yet,`dayjs.duration(11491200, "s").toISOString()` yields `P4M13D`.
Screen Shot 2022-12-29 at 7 03 51 PM

**Expected behavior**
Expect `dayjs.duration(11491200,"s").toISOString()` to yield `P4M21D`

**Information**
- Day.js Version: v1.11.5
- OS: MacOS Monterey
- Browser: chrome 108.0.5359.124
- Time zone: GMT-05:00 EST

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.