Unable to parse a date
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
HEAD
```
dayjs.extend(window.dayjs_plugin_customParseFormat);
```
SCRIPT:
```
const dateString = dayjs("29-09-2021", "DD-MM-YYYY").format('YYYY-MM-DD');
console.log("Date: ", dateString);
```
RESULT
Date: Invalid Date
Contributor guide
Research direction
Start by running the issue's inline reproduction with the customParseFormat plugin and verify the Invalid Date result. Trace the date-string parsing path used by the plugin, then add or update a regression test for "29-09-2021" with "DD-MM-YYYY". Done means the formatted result is "2021-09-29" without breaking existing parsing tests.
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
- 35/100