Module:Sandbox/Hellknowz/Test: Difference between revisions

Content deleted Content added
hmm
test
Line 183:
local day, month, year, hour, minute, second = tryParseDateTime(input)
 
return day .. month .. year .. hour .. minute .. second
--[[
-- If we have a second, we have all 6
if (second) then
 
if (notreturn checkIfYearValid(year) or not.. checkIfMonthValid(month) or not.. checkIfDayValid(day, month) or not.. checkIfHourValid(hour) or not.. checkIfMinuteValid(minute) or not.. checkIfSecondValid(second)) then return nil end
 
--if (not checkIfYearValid(year) or not checkIfMonthValid(month) or not checkIfDayValid(day, month) or not checkIfHourValid(hour) or not checkIfMinuteValid(minute) or not checkIfSecondValid(second)) then return nil end
return string.format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, second)
 
--return string.format("%d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, second)
end
 
end
--[[
-- Second, try to get just the date
day, month, year = tryParseDateOnly(input)