iamkun / iamkun/dayjs

Invalid Date and Invalid time value in node js

Open
#1,427 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

**Browser:**
```
dayjs('23-03-2021', 'DD-MM-YYYY').toISOString() // "2021-03-22T21:00:00.000Z"
```

**node v15.11.0:**
```
dayjs('23-03-2021', 'DD-MM-YYYY').toISOString() // Error: Invalid time value
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied dayjs parsing and toISOString() examples in a browser and Node v15.11.0, then compare the resulting behavior. Identify the cause of the Node-specific invalid time value and verify that the same input produces the intended ISO result in both environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.