-- This module powers .
local p =
-- Constantslocal lang = mw.language.getContentLanguagelocal getArgs = require('Module:Arguments').getArgs
local function formatMessage(secondsLeft, event, color, refreshLink) local timeLeft = lang:formatDuration(secondsLeft,) -- Find whether we are plural or not. local isOrAre if string.match(timeLeft, '^%d+')
function p.main(frame) local args = getArgs(frame)
if not (args.year and args.month and args.day) then return 'Error: year, month, and day must be specified' end if not (args.reminder) then return 'Error: reminder must be specified' end
local eventTime = os.time local timeToStart = os.difftime(eventTime, os.time) -- (future time - current time)
if timeToStart > 0 then -- Reminder still pending return else -- Reminder due return args.reminder endend
return p