-
Notifications
You must be signed in to change notification settings - Fork 118
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
loopdb: fix leapyear parsing #657
Conversation
37577e3
to
d17e024
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the fix 🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Got one Q.
loopdb/sqlite.go
Outdated
"and month %v: %v", dateTimeStr, err) | ||
} | ||
|
||
if !isLeapYear(thisYear) && isLeapYear(year) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't we just replace this if thisYear
is not a leap year?
if !isLeapYear(thisYear) && month == 2 && day == 29 {...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah seems to work as well, thanks 👍
d17e024
to
b8ada04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
This PR fixes #655 by adding a check if a date would be in a leap year.