Invalid Date and Invalid time value in node js
Open
- 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
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