codeforpdx / codeforpdx/recordexpungPDX

Fix the leap day bug

Open
#899 1 comment 0 reactions 1 assignee View on GitHub

@0x6362 is already working on this.

Since Aug 25, 2020.

bug Complexity: 3 expunger Priority: Low
Dominant language
TypeScript
Stars
55
Forks
93
Avg merge
8m
Merged PRs (30d)
9

Description

This task is done when:
  • We determine expected behavior of the app relative to any date in the future (for example, what is the date of eligibility three years after a leap day 2/29?)
  • We write unit tests to check for correctness
  • We handle these not-yet-clarified edge cases in the time analysis.

An example snippet to compare against the relative dates computed with month-offsets instead of day-offsets (which is our current approach for testing.

for i in range(365):
    if date.today() + relativedelta(days=i)  +relativedelta(years=-3) + relativedelta(months=1) + relativedelta(years=3) != date.today() + relativedelta(days=i) + relativedelta(months=1): print(date.today() + relativedelta(i))

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.