iamkun / iamkun/dayjs

Duration constructor not compatible with MomentJS duration constructor cannot parse "1.02:03:04"

Open
#2,687 0 comments 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**
The DayJS duration constructor can only parse a ISO8601
The MomentJS duration constructor can parse a ISO8601 string AND the string "1.02:03:04" to 1 day, 2 hours, 3 min, 4 seconds

**Expected behavior**
Add code to construct a DayJS duration with a string of the following format

Contributor guide

Open the contributing guide

Research direction

Start by locating the DayJS duration constructor and its existing ISO8601 string parsing. Compare the accepted inputs with MomentJS handling of "1.02:03:04"; done when that string constructs a duration representing 1 day, 2 hours, 3 minutes, and 4 seconds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.