customParseFormat with JS Date return Invalid format
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Plugin customParseFormat can't work with JS Date.
```
dayjs.extend(customParseFormat);
dayjs(new Date('2022-10-20 15:00:00'), 'DD.MM.YYYY').format('YYYY-MM-DD HH:mm') // Invalid Date
```
**Expected behavior**
```
dayjs(new Date('2022-10-20 15:00:00'), 'DD.MM.YYYY').format('YYYY-MM-DD HH:mm') // 2022-10-20 15:00
```
**Information**
- Day.js Version [v1.11.5]
- OS: any
- Browser: any
- Time zone: any
Contributor guide
Assessment
This issue has not been assessed yet.