Module:PageDates: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
function p.dates(frame) | function p.dates(frame) | ||
local lang = mw.language.getContentLanguage() | local lang = mw.language.getContentLanguage() | ||
local updatedTimestamp = frame:preprocess("{{REVISIONTIMESTAMP}}") | |||
local updatedTimestamp = | |||
local updatedDate = lang:formatDate("j F Y", updatedTimestamp) | local updatedDate = lang:formatDate("j F Y", updatedTimestamp) | ||
return string.format("It was last updated on %s.", updatedDate) | |||
return string.format(" | |||
end | end | ||
return p | return p |
Revision as of 22:58, 4 June 2025
Documentation for this module may be created at Module:PageDates/doc
local p = {}
function p.dates(frame)
local lang = mw.language.getContentLanguage()
local updatedTimestamp = frame:preprocess("{{REVISIONTIMESTAMP}}")
local updatedDate = lang:formatDate("j F Y", updatedTimestamp)
return string.format("It was last updated on %s.", updatedDate)
end
return p