iamkun / iamkun/dayjs

Incorrect calcultion of leap days

Open
#3,000 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

**Describe the bug**
When year is divisible by 400, there should be no leap day. However, when year=2000 and monthIndex=1, a daysinmonth of 29 is returned.

**Expected behavior**
When year is divisible by 400, there should be no leap day (hence returning 28).

**Information**
- Day.js Version: 1.11.19
- OS: macOS
- Browser Tauri Webview (Safari?)
- Time zone: EST New York

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.