fix: os.date.wday misinterpretation

This commit is contained in:
Rene Schallner
2021-11-26 02:19:36 +01:00
parent 4735cef711
commit ab80db3ec9

View File

@@ -95,7 +95,14 @@ local calenderinfo_today = function()
local dinfo = os.date("*t")
local opts = {}
opts.date = os.date("%Y-%m-%d")
opts.hdate = daymap[dinfo.wday]
local wday = dinfo.wday - 1
if wday == 0 then
wday = 7
end
if wday == 6 then
wday = 1
end
opts.hdate = daymap[wday]
.. ", "
.. monthmap[dinfo.month]
.. " "