Content deleted Content added
fix "on on" in DYK |
add ACID |
||
Line 56:
local prefixArgs = articleHistoryObj.prefixArgs
return args[prefix .. 'date'] or args[prefix .. 'date2'] or prefixArgs[prefix]
end
Line 76 ⟶ 92:
)
end
▲ end
▲ end
▲ local function validateDate(key, date)
▲ local longDate = getLongDate(date)
▲ if longDate then
▲ return longDate
▲ else
▲ articleHistoryObj:raiseError(
▲ string.format(
▲ "invalid date '%s' detected in parameter '%s'",
▲ tostring(date),
▲ key
▲ ),
▲ 'Template:Article history#Errors'
▲ )
end
end
Line 1,714:
},
-- On
{
id = 'OTD',
Line 1,740:
end,
categories = {'Selected anniversaries articles'}
},
-- Article Collaboration and Improvement Drive
{
id = 'ACID',
isActive = function (articleHistoryObj)
return articleHistoryObj.args.aciddate
end,
icon = 'Article Collaboration and Improvement Drive.svg',
iconCaption = 'Article Collaboration and Improvement Drive',
text = function (articleHistoryObj)
local args = articleHistoryObj.args
local blurb = 'This article was on the ' ..
'[[WP:ACID|Article Collaboration and Improvement Drive]] ' ..
'for the week of %s.'
local date = validateDate('aciddate', args.aciddate)
return string.format(blurb, date)
end
}
},
|