I need to check the day in some scene Lua/Luup code but the following does not appear to work, it always returns false on the day specified. Can anyone help?
local tday = (os.date("%A")) if (tday == "Wednesday") then return true else return false end
The %A format is locale dependent. Not sure if thatβs an issue or not. Iβd probably go with *t and get the day number from the table returned. Table contains year , month (1β12), day (1β31), hour (0β23), min (0β59), sec (0β61), wday (weekday, 1β7, Sunday is 1), yday (day of the year, 1β366), and isdst (daylight saving flag, a boolean)