dayjs not parsing german date string
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
dayjs is not able to parse a date string with this format: DD.MM.YYYY (2-digits day.2-digits month.4-digits year).
Given the date string "22.04.2022", dayjs tells me it is an invalid date.
Example:
```
dayjs.locale('de')
console.log(dayjs().locale()) <!-- Output: de -->
console.log(dayjs('22.04.2022')) <!-- Output: M {$L: 'de', $d: Invalid Date, $x: {…}, $y: NaN, $M: NaN, …} -->
```
Contributor guide
Research direction
Start with the provided reproduction for "22.04.2022" and locate Day.js's date-string parsing and German locale tests or entry points. Determine how this format is expected to be supported, add a regression case for the example, and run the relevant test suite to confirm the string is no longer treated as invalid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100