Module:Iboxu

-- -- infobox-related utils. it's iboxu (unlike lboxu)

local p = {}

function p.updated (frame) -- returns list of dates for mediawiki:pagename.* and mediawiki:pagename/* -- dpl-dependant -- format: date (code) -- 1: pagename: default: rootpagename; otherwise: root of {1} -- 2: format: #time-compatible date format; default: Y.m.d   -- 3: uselang: language code; default: en    local args = frame.args local pagename = args['pagename'] or args[1] or args['1'] or mw.title.getCurrentTitle.rootText local fmt = args['format'] or args[2] or args['2'] or 'Y.m.d'   local lang = args['uselang'] or args[3] or args['3'] or 'en' pagename = mw.ustring.match(pagename, '[^/]*')-- rootpagename local timeq = '' local dplq = '' local dplo = frame:preprocess(dplq) local ret, page, upd, pos = , , '', 0 for m in mw.ustring.gmatch(mw.text.trim(dplo), '[^\n]+') do       pos = mw.ustring.find(m, '|') or 0 if pos < 1 then-- wrong dpl output return ret end upd = mw.ustring.sub(m, 0, pos - 1) page = mw.ustring.sub(m, pos + 1) ret = ret .. mw.ustring.gsub(timeq, '%%date%%', upd) .. ' (' .. page .. ') ' end ret = mw.ustring.gsub(ret, '(.*) $', '%1')-- strip last \n\n return frame:preprocess(ret) end-- updated

return p