Module:Sandbox/Hellknowz/Test: Difference between revisions

Content deleted Content added
add printing of ranges
add full ranges
Line 282:
-- Only immediate big improvement is to only seekNextElement() when actually checking that deep, though this will make a (even bigger) mess
 
if (elements[1] == ELEMENT_ONETWODIGITS) then -- '3' or '10'
if (elements[2] == ELEMENT_WHITESPACE) then -- '3 '
if (elements[3] == ELEMENT_MONTHWORD) then -- '3 May'
Line 307:
end
end
end
elseif (elements[6] == ELEMENT_DASH) then -- '3 May 2013 - '
if (elements[7] == ELEMENT_ONETWODIGITS) then -- '3 May 2013 - 12'
if (elements[8] == ELEMENT_WHITESPACE) then -- '3 May 2013 - 12 '
if (elements[9] == ELEMENT_MONTHWORD) then -- '3 May 2013 - 12 February'
if (elements[10] == ELEMENT_WHITESPACE) then -- '3 May 2013 - 12 February '
if (elements[11] == ELEMENT_FOURDIGITS) then -- '3 May 2013 - 12 February 2014'
if (numberOfElements == 12) then return checkAndOutput(values[5], values[3], values[1], nil, nil, nil, values[11], values[9], values[7], nil, nil, nil) end
end
end
end
end
end
end
end
Line 455 ⟶ 467:
if (numberOfElements == 12) then return checkAndOutput(values[5], values[1], values[3], values[7] + periodHourAdd(values[12]), values[9], values[11]) end
end
end
end
end
end
end
elseif (elements[6] == ELEMENT_DASH) then -- 'May 3, 2013 - '
if (elements[7] == ELEMENT_MONTHWORD) then -- 'May 3, 2013 - February'
if (elements[8] == ELEMENT_WHITESPACE) then -- 'May 3, 2013 - February '
if (elements[9] == ELEMENT_ONETWODIGITS) then -- 'May 3, 2013 - February, 12'
if (elements[10] == ELEMENT_WHITESPACE) then -- 'May 3, 2013 - February, 12 '
if (elements[11] == ELEMENT_FOURDIGITS) then -- 'May 3, 2013 - February, 12 2014'
if (numberOfElements == 12) then return checkAndOutput(values[5], values[1], values[3], nil, nil, nil, values[11], values[7], values[9], nil, nil, nil) end
end
end