Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
(Linked and correctly ordered dates)
Line 177: Line 177:
return nil
return nil
end
end
local formatted_date = os.date('%Y %B %d', time) -- 2024 January 01
local formatted_date = os.date('[[%d %B]] [[%Y]]', time) -- [[01 January]] [[2024]]
formatted_date = string.gsub(formatted_date, ' 0', ' ') -- Convert 2024 January 01 to 2024 January 1
formatted_date = string.gsub(formatted_date, '[[0', '[[') -- Convert [[01 January]] [[2024]] to [[1 January]] [[2024]]
return formatted_date
return formatted_date
end
end