iamkun / iamkun/dayjs

When trying to specify a date in this format. Returns invalid date

Open
#2,103 2 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

**Expected behavior**
dayjs('28.04.1999', 'DD.MM.YYYY').format('DD.MM.YYYY') // Invalid Date
dayjs('28-04-1999', 'DD-MM-YYYY').format('DD.MM.YYYY') // Invalid Date

If you change the format
dayjs('04-28-1999', 'MM-DD-YYYY').format('DD.MM.YYYY') // Ok

**Information**
- Day.js Version [e.g. v1.11.6]
- OS: [ubuntu 22.04]
- nodeJs [v.16.17.1]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.