iamkun / iamkun/dayjs

Error in validating Format

Open
#1,424 1 comment 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

**Returing False Format**

dayjs("March-2021", "MMMM-YYYY",true).isValid() --> False

dayjs("10:00:00 AM", "hh:mm:ss A",true).isValid() --> False

dayjs("March-2021", "MMMM-YYYY").isValid() --> True

dayjs("10:00:00 AM", "hh:mm:ss A").isValid() --> True

**Why with strict format it is giving False as Output, How to Correct the Syntax to Receive True as Output?**

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the four dayjs parsing examples from the issue and compare the strict and non-strict results. Trace the format-validation entry point used by isValid() and determine whether the reported strict results are expected; done means documenting the cause and confirming the correct behavior or a focused fix with regression coverage.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.