iamkun / iamkun/dayjs

Validation fails for valid input with textual months followed by period (MMM. and MMMM.)

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

Description

**Describe the bug**
In our date field, formats including MMM and MMMM cause the `dayjs(value, format, strict=true).isValid()` to return false for all values.
![image](https://user-images.githubusercontent.com/25266325/177958558-be8708cd-88a3-4e49-8074-bbb78040e92c.png)

**Expected behavior**
`IsValid()` should return true

**Information**
- Day.js Version: dayjs@^1.10.6: version "1.11.3"
- OS: Windows 10
- Browser: Chrome
- Time zone: GMT+2 - Central European Summer Time

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with dayjs(value, format, strict=true).isValid() using formats containing MMM and MMMM followed by a period. Compare the result with the stated expectation that valid values return true; the issue does not name a source file or test to inspect.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
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.