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.
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