Module:DidYouKnow

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

function 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

function p.getFacts(arg) local s = "" local day = getCurrentDay(0) for i = 0, 0 do s = s .. "...that " .. facts.facts[day-i] .. "?"		if i < 4 then s = s .. "\n" end end return s end

return p