Jump to content

Module:Sandbox/antholo

From Wikiversity

Documentation for this module may be created at Module:Sandbox/antholo/doc

local p = {}
 
function p.conditions()
    local hour
    local result
 
    hour = tonumber(os.date('%H'))
    if hour < 12 then
        result = 'Good morning!'
    elseif hour < 18 then
        result = 'Good afternoon!'
    else
        result = 'Good evening!'
    end
 
    return result
end
 
return p