Editing Module:DateGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 6: | Line 6: | ||
} | } | ||
function | local function format_date(date_string) | ||
-- Split the date string | -- Split the date string into month, day, and year | ||
local | local month, day, year = date_string:match("(%d%d)-(%d%d)-(%d%d%d%d)") | ||
if month and day and year then | if month and day and year then | ||