iamkun / iamkun/dayjs

Negative year is considered a valid date.

Open
#2,653 0 comments 0 reactions 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

dayjs('2/3/-1996'.split("/").reverse().join("/")).format("DD/MM/YYYY")

Output in google chrome console

'02/03/1996'

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

No source file or test is identified in the report. Start by reproducing the expression in a browser console, then locate the date-string parsing entry point in the repository and trace how the negative year is handled; done means the reported input no longer produces the incorrect formatted result, with a regression test covering it.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.