Module:Dayssince
Documentation for this module may be created at Module:Dayssince/doc
local s = {}
function s.main(frame)
local sinceday = frame.args["Day"]
local sincemonth = frame.args["Month"]
local sinceyear = frame.args["Year"]
local curday = frame.args["Curday"]
local curmonth = frame.args["Curmonth"]
local curyear = frame.args["Curyear"]
local reference = os.time{day= tonumber(sinceday), year=tonumber(sinceyear), month=tonumber(sincemonth)}
local current_reference = os.time{day= tonumber(curday), year=tonumber(curyear), month=tonumber(curmonth)}
local daysfrom = os.difftime(current_reference, reference) / (24 * 60 * 60) -- seconds in a day
local wholedays = math.floor(daysfrom)
return wholedays
end
return s
-- created by me (TripleLuxen)