hm = { 'H', 'M', id = 'hm' },
hms = { 'H', 'M', 'S', id = 'hms' },
M = { 'M', id = 'M' },
s = { 'S', id = 's' },
d = { 'd', id = 'd' },
dh = { 'd', 'H', id = 'dh' },
for i = 1, nrDates do
local index = i == 1 and 1 or 4
dates[i] local y, m, d = Date(fields[index], fields[index+1], fields[index+2] if (m == 2 or m == '2') and (d == 29 or d == '29') then -- Workaround error with following which attempt to use invalid date 2001-02-29. -- {{age_ymwd|year1=2001|year2=2004|month2=2|day2=29}} -- {{age_ymwd|year1=2001|month1=2|year2=2004|month2=1|day2=29}} -- TODO Get rid of wantMixture because even this ugly code does not handle -- 'Feb' or 'February' or 'feb' or 'february'. if not ((y % 4 == 0 and y % 100 ~= 0) or y % 400 == 0) then d = 28 end end dates[i] = Date(y, m, d)
end
else