Fix Weekly Calendar backward compatibility

This commit is contained in:
Evgeny
2024-11-11 09:51:35 +07:00
parent d1f1be14a1
commit d93c42b50a

View File

@@ -168,7 +168,7 @@ function format_day(y,m,d,events)
end end
if year == os.date("%Y"):gsub("^0","") and month == os.date("%m"):gsub("^0","") and d == os.date("%d"):gsub("^0","") then if year == os.date("%Y"):gsub("^0","") and month == os.date("%m"):gsub("^0","") and d == os.date("%d"):gsub("^0","") then
dd = "<font color=\""..color.progress_good.."\">"..dd.."</font>" dd = "<font color=\""..color.progress_good.."\">"..dd.."</font>"
elseif calendar:is_holiday(os.time{year=y,month=m,day=d}) then elseif calendar.is_holiday and calendar:is_holiday(os.time{year=y,month=m,day=d}) then
dd = "<font color=\""..color.progress_bad.."\">"..dd.."</font>" dd = "<font color=\""..color.progress_bad.."\">"..dd.."</font>"
else else
dd = "<font color=\""..color.primary_text.."\">"..dd.."</font>" dd = "<font color=\""..color.primary_text.."\">"..dd.."</font>"