iamkun / iamkun/dayjs

When string format contains a dot, the date is invalid

Open
#1,268 4 comments 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

I tried to convert date from a sting, it looks like if the string contains a dot, the date is invalid.

Check this example translating format in nl language to date. The first one fails, the second works fine in the console.

https://codesandbox.io/s/wandering-fog-yhgmk?file=/src/index.js

Contributor guide

Open the contributing guide

Research direction

Start by running the linked CodeSandbox example from src/index.js and compare the two date-format cases, including the Dutch locale format containing a dot. Trace the date parsing and locale handling involved; done means the dotted format converts to a valid date while the existing working case remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.