Module:XfD old/sandbox explained

local p = local tableTools = require("Module:TableTools")local ymd = require("Module:YMD to ISO")._mainlocal lang = mw.getContentLanguagelocal function getlog(name) -- Files for discussion has no /Log/ in the title for some reason, so it is optional return mw.ustring.match(name, "Log/(.*)") or mw.ustring.match(name, "/(.*)")endfunction sortkey(name1, name2) local key1 = ymd(getlog(name1)) local key2 = ymd(getlog(name2)) return key1 > key2endfunction p._main(frame, makeoutput) local t = frame.args.title or frame:getParent:getTitle local content = mw.title.new(t .. "/Old unclosed discussions"):getContent local m = mw.ustring.gmatch(content, "* %[%[(" .. t .. "/L?o?g?/?[^#]*)#%