Module:DidYouKnow

local p = {} local facts = require("Module:DidYouKnow/facts")

function p.getFacts(arg) local s = "" for i = 5, 1, -1 do s = s .. "* ...that " .. facts.facts[i] .. "?"		if i > 1 then s = s .. "\n" end end return s end

function p.getCurrentDay(arg) local now = os.date("!*t") local day = now["day"] local month = now["month"] local year = now["year"] if month < 3 then year = year-1 month = month+12 end local A = math.floor(year/100) local B = math.floor(A/4) local C = 2-A+B local E = math.floor(365.25*(year+4716)) local F = math.floor(30.6001*(month+1)) return C+day+E+F-2459950 end

return p