Module:Protection banner: Difference between revisions

turn Blurb.formatDate into Blurb:_formatDate so that it can access the config
(get the expiry date format from a config message)
(turn Blurb.formatDate into Blurb:_formatDate so that it can access the config)
Line 350:
end
 
-- StaticPrivate methods --
 
function Blurb.formatDate:_formatDate(num)
-- Formats a Unix timestamp into dd Month, YYYY format.
lang = lang or mw.language.getContentLanguage()
Line 365:
end
end
 
-- Private methods --
 
function Blurb:_getExpandedMessage(msgKey)
Line 464 ⟶ 462:
local expiry = self._protectionObj.expiry
if type(expiry) == 'number' then
return Blurb.formatDateself:_formatDate(expiry)
else
return expiry
Line 545 ⟶ 543:
local protectionDate = self._protectionObj.protectionDate
if type(protectionDate) == 'number' then
return Blurb.formatDateself:_formatDate(protectionDate)
else
return protectionDate