无编辑摘要 标签:已被回退 |
无编辑摘要 标签:手工回退 |
||
第16行: | 第16行: | ||
local edits = mw.site.stats.edits |
local edits = mw.site.stats.edits |
||
⚫ | |||
return edits |
|||
⚫ | |||
⚫ | |||
-- return title |
|||
⚫ | |||
end |
end |
||
return p |
return p |
2024年4月18日 (四) 10:44的最新版本
local randoms = mw.loadData 'Module:Featured picture list/randoms'
local dates = mw.loadData 'Module:Featured picture list/dates'
local p = {}
function p.main(frame)
local lang = mw.language.getContentLanguage()
local year = lang:formatDate('Y', nil, true)
local month = lang:formatDate('n', nil, true)
local day = lang:formatDate('j', nil, true)
if dates[year] and dates[year][month] and dates[year][month][day] then
return frame:preprocess(dates[year][month][day])
elseif dates['any'] and dates['any'][month] and dates['any'][month][day] then
return frame:preprocess(dates['any'][month][day])
end
local edits = mw.site.stats.edits
local title = randoms[edits % randoms.length + 1]
return frame:expandTemplate {title = title}
end
return p