Closed ReekenX closed 5 months ago
@ReekenX Thank you for the PR. Appreciate it!
Follow up question to @mandarons
Could you bump version to icloudpy 0.5.1
and release to PyPi? Otherwise pip install icloudpy
would still give this calendar sync issue.
Somebody created bug in the past https://github.com/mandarons/icloudpy/issues/26. It missed steps to reproduce or a fix.
This PR describes how to reproduce and has code fix.
The issue is that calendar sync will fail on months that have Monday as 1st day of the month (e.g. 2024 April 1 is Monday).
Buggy code is:
According to the docs:
So in this code variable
first_day
can return0
(for Monday) and this will crashdatetime()
.Before the fix
After the fix