Content deleted Content added
data tables to ~/data; |
No edit summary |
||
Line 24:
if c1 then -- c1 always set on match
t = {
[pattern[2] or 'x'] = c1, -- fill the table of captures with
[pattern[3] or 'x'] = c2, -- take index names from pattern table and assign sequential captures
[pattern[4] or 'x'] = c3, -- index name may be nil in pattern table so "or 'x'" spoofs a name for this index in this table
Line 30:
day = t.d or ''; -- translate table contents to named variables;
month = mw.ustring.lower (t.m or ''); -- absent table entries are nil so set unused parts to empty string; lowercase for indexing
month = data.override_names[month] or data.month_names[month]; -- replace non-English name with English name from translation tables
year= t.y or '';
if month then
if 'dmy' == pattern[5] then -- for dmy dates
return table.concat ({day,
elseif 'my' == pattern[5] then -- for month year dates
return table.concat ({
end
end
|