iamkun / iamkun/dayjs

Parsing date with the lowercase month returning invalid date (format: MMM D, YYYY)

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

Hi, could someone help please, I have a question regarding parsing format with lowercase months names (`en` locale) and getting an invalid date.
We're looking for opportunity to allow user use different input formats and also want to allow use date with the lowercase months:
| Input String | isValid() method value |
| ------------- | ------------- |
| Screenshot at Dec 28 15-17-04 | **false** - invalid date |
| Screenshot at Dec 28 15-23-28 | true - valid date |

Is there any way to get valid date parsing with the first letter of the month in lowercase?

Appreciate your help!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported `en` locale parsing case with the `MMM D, YYYY` format and compare title-case and lowercase month inputs. Trace the date parsing entry point and existing locale behavior; done means lowercase month names parse as valid dates without breaking the existing format.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.