Module:Active hours

local p = {};

p.hello = function( frame ) local f = frame:getParent.args

local tz = tonumber(f[1]) -- time zone, if UTC+1, then supply 1 local frm = (tonumber(f[2])-tonumber(tz)+48) % 24 -- beginning of active hours - if 16:00, then supply 16 local untl = (tonumber(f[3])-tonumber(tz)+48) % 24 -- end of active hours - if 22:00, then supply 22

if untl < frm then untl = untl + 24 end

local tim = tonumber(f[4]) -- current hour, UTC

if (tim >= frm) and (tim < untl) then str = "This user is not necessarily unlikely to be active at the moment" else str= "This user is unlikely to be active at the moment" end return str end

return p