iamkun / iamkun/dayjs

customParseFormat doesn't work when format doesn't fit the Date

Open
#605 12 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

[Issuehunt badges](https://issuehunt.io/r/iamkun/dayjs/issues/605)

`
dayjs('2019/04/19, 'MMDDYY').isValid()
`
returns true
and it parses to Wed Jul 20 2005.

Moment.js does not parse it.

https://jsfiddle.net/3meh8g0k/

You can get the same results using other different formats (e.g dayjs('2019/04/19, 'MM' returns Mon May 20 2019)

---

IssueHunt Summary

#### [iamkun iamkun](https://issuehunt.io/u/iamkun) has been rewarded.

### Backers (Total: $100.00)

- [issuehunt issuehunt](https://issuehunt.io/u/issuehunt) ($100.00)

### Submitted pull Requests
- [#866 Consider using Intl api and update customParseFormat](https://issuehunt.io/r/iamkun/dayjs/pull/866)
---

### Tips

- Checkout the [Issuehunt explorer](https://issuehunt.io/r/iamkun/dayjs/) to discover more funded issues.
- Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
---
IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)

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.