Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the leap day bug #899

Open
wittejm opened this issue Feb 28, 2020 · 1 comment
Open

Fix the leap day bug #899

wittejm opened this issue Feb 28, 2020 · 1 comment
Assignees
Labels
bug Something isn't working Complexity: 3 Refer to issue #739 for more details expunger Changes to the expungement logic Priority: Low Refer to issue #739 for more details

Comments

@wittejm
Copy link
Contributor

wittejm commented Feb 28, 2020

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))
@wittejm wittejm added bug Something isn't working Priority: Low Refer to issue #739 for more details Complexity: 3 Refer to issue #739 for more details expunger Changes to the expungement logic labels Feb 28, 2020
@KentShikama KentShikama removed their assignment Mar 5, 2020
@0x6362
Copy link
Contributor

0x6362 commented Aug 25, 2020

This is quality "Falsehoods Programmers Believe About Dates" material and great blog post / contributor recruiting fodder, but I'm very curious if one of our legal partners could weigh in on what the most likely interpretation is based on case law / past precedent, because I would love to take a crack at this.

It seems that ORS 174.120 is the relevant statue:

(5) If a statute of limitation or other procedural statute governing civil or criminal proceedings provides that an act be done within one or more years, the time for performing the act is computed in calendar years. If the specified period begins to run on a date other than February 29, the act must be done on or before the same date in the calendar year in which the specified period ends as the date in the calendar year in which the specified period began to run. If the specified period of time begins to run on February 29, the act must be done on or before February 28 of the calendar year in which the specified period ends. [Amended by 1979 c.284 §118; 1985 c.282 §2; 2002 s.s.1 c.10 §6; 2003 c.228 §1; 2013 c.1 §14]

For the purposes of expungements requirements, it seems like this is in favour of March 1st being the eligible day for crimes committed on Feb 28th or 29th.

It seems like the opinion in Neff v. Jackson Cty., 187 Or App 402, 67 P3d 977 (2003) is also in favour of considering March 1st, but I do not have access to it.

@0x6362 0x6362 self-assigned this Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Complexity: 3 Refer to issue #739 for more details expunger Changes to the expungement logic Priority: Low Refer to issue #739 for more details
Projects
None yet
Development

No branches or pull requests

3 participants