iamkun / iamkun/dayjs

Case sensitivity parsing with customParseFormat plugin 'MMM' or 'MMMM'

Open
#1,720 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

Is there a way to ignore case when parsing the month formats 'MMM' or 'MMMM'?

dayjs("2020-NOV-02", "YYYY-MMMM-DD", false); - invalid
dayjs("2020-Nov-02", "YYYY-MMMM-DD", false); - valid
dayjs("2020-nov-02", "YYYY-MMMM-DD", false); - invalid

Contributor guide

Open the contributing guide

Research direction

The issue identifies Day.js's customParseFormat plugin as the entry point; first reproduce the three YYYY-MMMM-DD examples, including the invalid uppercase and lowercase cases. Done means parsing month names with MMM or MMMM accepts differing case while preserving the existing valid behavior, with a regression test for the examples.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.