Fix January display issues #98 and #99 #105
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #98 and #99
display problem occurs for any year where January 1 is a Sunday and firstweekday is set to "sunday". fixes code by checking if the current month is January and if January 1 of the current year falls on a Sunday. If so, it sets w to the week number returned by strftime instead of isocalendar and sets wn to zero. That fixes the January problem for years where January 1 is on a Sunday and the firstweekday = 'sunday' without messing up any other months. Code fix as proposed by @jemiele1 in #99
NOTE: automatic code checks are not working and are failing in all current PR's, something is wrong with the code check environments unrelated to this and the other PRs.
Test failures are due to ERROR: test_calendar_textvariable (tests.test_calendar.TestCalendar) from
tkcalendar\tests\test_calendar.py", line 228, in test_calendar_textvariable year=2015, month=1, day=3, textvariable=var)which causes
This build error only occurs in the python 3.6 and 3.7 builds and should be addressed outside of this PR