Describe the bug
There's a weird behavior when it comes to getting an ISO duration string from the dayjs's duration object. For example:
dayjs.duration({ year:1, week: 2 }).toISOString(); // 'P1Y14D'
dayjs.duration('P2Y3W5D').toISOString(); // 'P2Y26D'
Expected behavior
It'd be really great if weeks weren't converted to days. So we'd get these in the output:
dayjs.duration({ year:1, week: 2 }).toISOString(); // 'P1Y2W'
dayjs.duration('P2Y3W5D').toISOString(); // 'P2Y3W5D'
Information
- Day.js Version: v1.11.8
- OS: Linux
- Browser: Brave v 1.77.97
- Time zone: GMT+3:30