Module:Protection banner: Difference between revisions
and finally protectionDate
(next expiry) |
(and finally protectionDate) |
||
Line 87: | Line 87: | ||
-- Set protection date | -- Set protection date | ||
self. | self.protectionDate = validateDate(args.date, 'protection date') | ||
-- Set banner config | -- Set banner config | ||
Line 362: | Line 362: | ||
function Blurb:_makeOfficeBlurbParameter() | function Blurb:_makeOfficeBlurbParameter() | ||
local protectionDate = self._protectionObj | local protectionDate = self._protectionObj.protectionDate | ||
if protectionDate then | if protectionDate then | ||
return self:_getExpandedMessage('office-blurb-protectiondate') | return self:_getExpandedMessage('office-blurb-protectiondate') | ||
Line 394: | Line 394: | ||
function Blurb:_makeProtectionDateParameter() | function Blurb:_makeProtectionDateParameter() | ||
local protectionDate = self._protectionObj | local protectionDate = self._protectionObj.protectionDate | ||
if type(protectionDate) == 'number' then | if type(protectionDate) == 'number' then | ||
return Blurb.formatDate(protectionDate) | return Blurb.formatDate(protectionDate) | ||
Line 440: | Line 440: | ||
function Blurb:_makeResetBlurbParameter() | function Blurb:_makeResetBlurbParameter() | ||
local protectionDate = self._protectionObj | local protectionDate = self._protectionObj.protectionDate | ||
if protectionDate then | if protectionDate then | ||
return self:_getExpandedMessage('reset-blurb-protectiondate') | return self:_getExpandedMessage('reset-blurb-protectiondate') |