Module:Sandbox/SD0001/ext

local p = {}

function p.noticetext -- Arguments local frame = mw.getCurrentFrame:getParent -- local nom = frame.args['nom'] local nomdate = frame.args['nomdate'] or frame.args['date'] -- local nomreason = frame.args['nomreason'] -- local sec = frame.args['2nd'] -- local secdate = frame.args['2nddate'] -- local secreason = frame.args['2ndreason'] local dec = frame.args['decline'] or frame.args['con'] -- local decreason = frame.args['declinereason'] or frame.args ['conreason'] -- local decdate = frame.args['declinedate'] or frame.args['condate'] -- Program -- local pagtext = mw.title.getCurrentTitle.subjectPageTitle:getContent -- p['present'] = string.match(pagetext, '{{Proposed deletion/dated.-|timestamp = (%d+)') local nomdate_ymd = lang:formatDate('Y m d') local nomdate_arr = mw.text.split(nomdate_ymd, ' ') local seconds = os.time - os.time({year=nomdate_arr[0], month=nomdate_arr[1], day=nomdate_arr[2]}) if not nomdate or dec or seconds > 864000 then -- 10 days function p.type return 'notice' end p['cat'] = 'y'		return 'dec_notice' else function p.type return 'notice' end p['cat'] = 'n'		return 'act_notice' end return nil	--unreachable end

return p