widget.cal: set length of day names to 3; closes #426

This commit is contained in:
Azarym 2019-04-23 11:43:32 +02:00 committed by Luca Capezzuto
parent 85db468376
commit 724c7b9a3a
No known key found for this signature in database
GPG Key ID: EDCFE1C5B0CD8FB5
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ local function factory(args)
local d = os.date("*t", t)
local mth_days, st_day, this_month = d.day, (d.wday-d.day-cal.week_start+1)%7, os.date("%B %Y", t)
local notifytable = { [1] = string.format("%s%s\n", string.rep(" ", floor((28 - this_month:len())/2)), markup.bold(this_month)) }
for x = 0,6 do notifytable[#notifytable+1] = os.date("%a ", os.time { year=2006, month=1, day=x+cal.week_start }) end
for x = 0,6 do notifytable[#notifytable+1] = os.date("%a", os.time { year=2006, month=1, day=x+cal.week_start }):sub(1, 3) .. " " end
notifytable[#notifytable] = string.format("%s\n%s", notifytable[#notifytable]:sub(1, -2), string.rep(" ", st_day*4))
local strx
for x = 1,mth_days do