Анонимный участник
Модуль:Wikidata: различия между версиями
Новая страница: «Test»
/>Vlsergey (Новая страница: «Test») |
/>Vlsergey (Новая страница: «Test») |
||
Строка 99: | Строка 99: | ||
local left = s.year - ( s.year % power ); | local left = s.year - ( s.year % power ); | ||
return { tonumber(os.time( {year=left, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, | return { tonumber(os.time( {year=left, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, | ||
tonumber(os.time( {year=left + power - 1, month=12, day=31, hour=29, min=59, sec= | tonumber(os.time( {year=left + power - 1, month=12, day=31, hour=29, min=59, sec=58} )) * 1000 + 1999 }; | ||
end | end | ||
if ( precision == 9 ) then | if ( precision == 9 ) then | ||
return { tonumber(os.time( {year=s.year, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, | return { tonumber(os.time( {year=s.year, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, | ||
tonumber(os.time( {year=s.year, month=12, day=31, hour=23, min=59, sec= | tonumber(os.time( {year=s.year, month=12, day=31, hour=23, min=59, sec=58} )) * 1000 + 1999 }; | ||
end | end | ||
Строка 111: | Строка 111: | ||
local lastDay = lastDays[s.month]; | local lastDay = lastDays[s.month]; | ||
return { tonumber(os.time( {year=s.year, month=s.month, day=1, hour=0, min=0, sec=0} )) * 1000, | return { tonumber(os.time( {year=s.year, month=s.month, day=1, hour=0, min=0, sec=0} )) * 1000, | ||
tonumber(os.time( {year=s.year, month=s.month, day=lastDay, hour=23, min=59, sec= | tonumber(os.time( {year=s.year, month=s.month, day=lastDay, hour=23, min=59, sec=58} )) * 1000 + 1999 }; | ||
end | end | ||
if ( precision == 11 ) then | if ( precision == 11 ) then | ||
return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=0, min=0, sec=0} )) * 1000, | return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=0, min=0, sec=0} )) * 1000, | ||
tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=23, min=59, sec= | tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=23, min=59, sec=58} )) * 1000 + 1999 }; | ||
end | end | ||
if ( precision == 12 ) then | if ( precision == 12 ) then | ||
return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=0, sec=0} )) * 1000, | return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=0, sec=0} )) * 1000, | ||
tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=59, sec= | tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=59, sec=58} )) * 1000 + 19991999 }; | ||
end | end | ||
if ( precision == 13 ) then | if ( precision == 13 ) then | ||
return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} )) * 1000, | return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} )) * 1000, | ||
tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec= | tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=58} )) * 1000 + 1999 }; | ||
end | end | ||