Module:Citation/CS1/Date validation: Difference between revisions

Content deleted Content added
imported>Trappist the monk
sync from sandbox;
imported>Trappist the monk
bug fix; strip leading '0' from ymd dates when reformatting;
Line 849:
t.m = cfg.date_names['inv_local_l'][tonumber(t.m)]; -- convert it to a month name
end
t.d = t.d:gsub ('0(%d)', '%1'); -- strip leading '0' from day if present
elseif 'ymd' == format_param then -- when converting to ymd
if 1582 > tonumber(t.y) then -- ymd format dates not allowed before 1582