Module:Sandbox/Hellknowz/Test: Difference between revisions

Content deleted Content added
urgh, fix
me and indices are not friends
Line 311:
wasTime = true -- this is a valid final time, so we can check date appended to this
i = 3 -- '10', ':', '28', ':' and '27' are five elements, so we start 3 further from 3
if (elements[46] == ELEMENT_TIMEPERIOD) then -- '10:28:27 am'
if (numberOfElements == 46) then return checkAndOutput(nil, nil, nil, values[1] + periodHourAdd(values[6]), values[3], values[5]) end
-- wasTime = true -- this is a valid final time, so we can check date appended toalready thisset
i = 4 -- '10', ':', '28', ':', '27' and 'am' are six elements, so we start 4 further from 3
end
Line 319:
elseif (elements[4] == ELEMENT_TIMEPERIOD) then -- '10:28 am'
if (numberOfElements == 4) then return checkAndOutput(nil, nil, nil, values[1] + periodHourAdd(values[4]), values[3], nil) end
-- wasTime = true -- this is a valid final time, so we can check date appended to this (should already be true)set
i = 2 -- '10', ':', '28' and 'am' are four elements, so we start 2 further from 3
end