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 off-by-one dayofquarter() in leap years #36543

Merged
merged 1 commit into from
Jul 7, 2020
Merged

Fix off-by-one dayofquarter() in leap years #36543

merged 1 commit into from
Jul 7, 2020

Conversation

lbilli
Copy link
Contributor

@lbilli lbilli commented Jul 5, 2020

dayofquarter() is off by one for leap years when month > 3.
Before:

julia> dayofquarter(Date(2019,4,1))
1
julia> dayofquarter(Date(2020,4,1))
2

After:

julia> dayofquarter(Date(2019,4,1))
1
julia> dayofquarter(Date(2020,4,1))
1

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Jul 5, 2020

Since I pointed this out, I reviewed and seems ok. And since a trivial fix, backport to 1.5 and 1.0?

@StefanKarpinski StefanKarpinski merged commit e23635c into JuliaLang:master Jul 7, 2020
@StefanKarpinski StefanKarpinski added backport 1.0 kind:bugfix This change fixes an existing bug domain:dates Dates, times, and the Dates stdlib module labels Jul 7, 2020
@KristofferC KristofferC mentioned this pull request Jul 8, 2020
13 tasks
KristofferC pushed a commit that referenced this pull request Jul 8, 2020
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:dates Dates, times, and the Dates stdlib module kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants