Изменения

исправление
Строка 540: Строка 540:  
local strin = args[1]  
 
local strin = args[1]  
 
     local year, month, day
 
     local year, month, day
     if    not not strin:match( "(-?%d%d%d%d)-(%d%d)-(%d%d)" ) then
+
     if    not not strin:match( "(-?%d%d%d%d%d)-(%d%d)-(%d%d)" ) then
     year, month, day = strin:match( "(-?%d%d%d%d)-(%d%d)-(%d%d)" )
+
     year, month, day = strin:match( "(-?%d%d%d%d%d)-(%d%d)-(%d%d)" )
 
     elseif not not strin:match( "(-?%d+)-(%d+)-(%d+)" ) then
 
     elseif not not strin:match( "(-?%d+)-(%d+)-(%d+)" ) then
 
     year, month, day = strin:match( "(-?%d+)-(%d+)-(%d+)" )
 
     year, month, day = strin:match( "(-?%d+)-(%d+)-(%d+)" )
     elseif not not strin:match( "(%d%d)%.(%d%d)%.(-?%d%d%d%d)" ) then
+
     elseif not not strin:match( "(%d%d)%.(%d%d)%.(-?%d%d%d%d%d)" ) then
     day, month, year = strin:match( "(%d%d)%.(%d%d)%.(-?%d%d%d%d)" )
+
     day, month, year = strin:match( "(%d%d)%.(%d%d)%.(-?%d%d%d%d%d)" )
 
     elseif not not strin:match( "(%d+)%.(%d+)%.(-?%d+)" ) then
 
     elseif not not strin:match( "(%d+)%.(%d+)%.(-?%d+)" ) then
 
     day, month, year = strin:match( "(%d+)%.(%d+)%.(-?%d+)" )
 
     day, month, year = strin:match( "(%d+)%.(%d+)%.(-?%d+)" )
Анонимный участник