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.
Continuation of PR #74
I wanted to respect locales - both day names as well as using locale specific first-day-of-week. Example in US it's Sunday but EU it's Monday but Iran it's Saturday. (Edit: Maldives is Friday!)
Also I used a library
drawsvg
to draw the month calendar, it's a bit longer code but the SVG is much smaller and potentially the calendar generation code becomes reusable if someone wants to put it in another template.Have a look at the branch in progress, I think I've managed to replicate what you did: https://github.com/mendhak/waveshare-epaper-display/pull/77/files#diff-c646c4a352115b8c5dda6a5348c6540a2db4f6b8114b64875f9cf36684d78a61
Example with locales:
ko_KR
en_US
en_GB
Just doing a bit more testing and then I should be able to merge it