-
Notifications
You must be signed in to change notification settings - Fork 22
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
calendar_plot() showing week number = 53 in the last week of January 2021 #19
Comments
Hi, thanks for reaching out! You are absolutely right. I have found the bug and will release a new micro version (v0.1.3) tonight after work. |
- Add order preserving unique() function - Improve input handling in preprocess_month() - Optional 'year' argument to avoid ambiguity - Improved error messages - Remove ticklabels in month_plot when weeknum_label=False. - Add optional 'year' argument to month_plot as well.
bug: Fix bug in calendar plot weeknum order (#19)
Hi @e-hulten , I think week number should reset at each year? E.g. The first week of Jan 2021 might be showing as 53/1 in this case? Otherwise, if you plot year 2021 alone, then the week number starts at 53, which is kind of counter intuitive. |
I agree that it seems a little counter-intuitive, but it deliberate and according to the ISO week date definition:
There are pros and cons with any definition, but to my knowledge this is the most widely used one. It is neat because all week numbers are uniquely defined, and all dates are uniquely defined by year, week number, and weekday number. I am currently not planning on changing this. WorkaroundsThere are a couple of possible workarounds if you don't want 2021 starting with week 53. The first one is to set
The second option is to manually edit the yticklabels of the returned
|
Thanks for the detailed explanations, didn't aware there's an ISO standard for that :-) |
Seems like a bug?
The text was updated successfully, but these errors were encountered: