Module:On this day: Difference between revisions

Content deleted Content added
m Protected Module:Template:On this day: Match protection on parent template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Block all non-admin users] (indefinite))
 
(3 intermediate revisions by 3 users not shown)
Line 17:
local i = 1
local ret = {}
local page = mw.title.getCurrentTitle().text
local fmt = '[https://en.wikipedia.org/wiki/Wikipedia:Selected_anniversaries/%s?oldid=%s %s]'
if not args.demo then
fmt = fmt .. '[[Category:Selected anniversaries (%s)|' .. page .. '%s]]'
local page = frame:preprocess( '{{PAGENAME}}' )
fmt = fmt .. '[[Category:Selected anniversaries (%s)|' .. page .. ']]'
end
local lang = mw.getContentLanguage()
Line 34:
oldid,
lang:formatDate( 'F j, Y', date ),
lang:formatDate( 'F Y', date ),
page
)
i = i + 1