iamkun / iamkun/dayjs

[docs] When can you parse without the `CustomParseFormat` plugin?

Open
#2,739 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
48.7k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
[String + Format](https://day.js.org/docs/en/parse/string-format) (https://github.com/dayjs/dayjs-website/blob/master/docs/parse/string-format.md) does not specify when the `CustomParseFormat` plugin can be omitted. The second line "This requires the `CustomParseFormat` plugin to work" makes it seem like you should always use the plugin.

**Expected behavior**
List all cases where you can parse without the `CustomParseFormat` plugin. ChatGPT reports these cases:
```
YYYY-MM-DD
YYYY-MM-DDTHH:mm:ssZ
YYYY-MM-DDTHH:mm:ss.SSSZ
YYYY-MM-DDTHH:mm
YYYY-MM-DDTHH
YYYY-MM
YYYY
MM-DD
HH:mm:ss
HH:mm
```

**Information**
- Day.js version: 1.11.13
- OS: N/A
- Browser: N/A
- Time zone: N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/parse/string-format.md and the linked String + Format documentation, then inspect how the CustomParseFormat plugin affects the listed formats. Verify which cases work without the plugin before updating the explanation to identify them clearly. Done means the documentation no longer implies that the plugin is always required.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.