Skip to content

Fix leap year bug in date-to-grid-position calculation#39

Merged
K20shores merged 1 commit into
mainfrom
date_fix
Feb 16, 2026
Merged

Fix leap year bug in date-to-grid-position calculation#39
K20shores merged 1 commit into
mainfrom
date_fix

Conversation

@K20shores
Copy link
Copy Markdown
Owner

Replace delta.days // 365 with relativedelta(date, birthdate).years to correctly handle leap year accumulation. The old integer division would overshoot by one year for dates near the end of a year-of-life once enough leap days had accumulated.

Replace `delta.days // 365` with `relativedelta(date, birthdate).years`
to correctly handle leap year accumulation. The old integer division
would overshoot by one year for dates near the end of a year-of-life
once enough leap days had accumulated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@K20shores K20shores merged commit 8a61def into main Feb 16, 2026
16 checks passed
@K20shores K20shores deleted the date_fix branch February 16, 2026 23:59
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (6eb13f2) to head (712e9cb).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   93.84%   93.83%   -0.01%     
==========================================
  Files           6        6              
  Lines         715      714       -1     
==========================================
- Hits          671      670       -1     
  Misses         44       44              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant