new Dayjs with string in Korean that cause invalid date
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
korean using this format "YYYY.MM.DD."
when I run this , dayjs("2022.06.20.") , it returns invalid date.
Maybe this line's regex should support more format?
https://github.com/iamkun/dayjs/blob/74e82b9da5ec8b90361fc27ac7c8b63faf354502/src/index.js#L66
**Expected behavior**
new dayjs() returns a valid date.
**Information**
- Day.js Version any
- Browser Edge 18
Contributor guide
Research direction
Start with the date parsing logic in src/index.js at the linked line and reproduce the issue using dayjs("2022.06.20."). Check how the current regular expression handles the trailing period in the Korean date format. Done means this input returns a valid date without breaking existing parsing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100