Module:Bengali Unix Timestamp: Difference between revisions

Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 8:
local input = date
local year, month, day
if not date == '' then
day, month, month = input:match("(%d+)%-(%d+)%-(%d+)")
end
if date then
if not (year and month and day) then
day, month, year = input:match("(%d+)%s+(%a+)%s+(%d+)")
Line 17 ⟶ 18:
end
end
end
 
if not (year and month and day) then
return "Invalid date format. Use DD-YYYY-MM or DD Month YYYY."