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

[BUG] Leap Day crashed "On This Day" #157

Closed
Phantomsteve2001 opened this issue Feb 29, 2020 · 1 comment
Closed

[BUG] Leap Day crashed "On This Day" #157

Phantomsteve2001 opened this issue Feb 29, 2020 · 1 comment

Comments

@Phantomsteve2001
Copy link

Phantomsteve2001 commented Feb 29, 2020

v7.6.1.0

Describe the bug
If you try to run the "On This Day" for a leap day (29th Feb 2020, 29th February 2016, etc) then an error occurs: "Unhandled exception has appeared in your application.
Year, Month, and Day parameters describe an un-representable DateTime"

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'On This Day'
  2. Choose a Leap Day (29th Feb 2020/2016/2012/etc)
  3. Keep the "Year Step" at the default 5 years
  4. Click on 'Update list of Events'
  5. Error above arises.

Expected behavior
For the software to be aware that if the date of 29th February is entered, the "Year Step" should be changed to 4, so it only checks leap years! (The issue doesn't arise if "Whole" month is selected rather than "Single Day")

Screenshots
See attached

Additional context
n/a
Annotation 2020-02-29 221846

@ShammyLevva
Copy link
Owner

ShammyLevva commented Feb 29, 2020

Good catch. The logic for leap year is even easier than that...

return DateTime.IsLeapYear(year)

Fixed in v7.6.1.1

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

No branches or pull requests

2 participants