Modul:TwitterSnowflake: Unterschied zwischen den Versionen
Fix a Lua error appearing on pages such as August 11 when there's no date
K (stray) |
(Fix a Lua error appearing on pages such as August 11 when there's no date) |
||
Zeile 31: | Zeile 31: | ||
end | end | ||
frame.args.format = "%B %e, %Y" | frame.args.format = "%B %e, %Y" | ||
frame.args.date = mw.ustring.gsub(frame.args.date, "(%d%d%d%d)%a", "%1") | if frame.args.date then | ||
frame.args.date = mw.ustring.gsub(frame.args.date, "(%d%d%d%d)%a", "%1") | |||
end | |||
frame.args.epoch = tonumber(frame.args.epoch) or 1288834974 | frame.args.epoch = tonumber(frame.args.epoch) or 1288834974 | ||
local epochdate = Date(os.date("%B %e, %Y", frame.args.epoch)) | local epochdate = Date(os.date("%B %e, %Y", frame.args.epoch)) |