Anonymous user
Palindrome dates: Difference between revisions
m
→Lua: day>0 cond unnecessary
imported>Nmz (Added Lua section {{header|lua}}) |
imported>Nmz m (→Lua: day>0 cond unnecessary) |
||
Line 1,659:
local monthS, dayS = yearS:reverse():match"^(%d%d)(%d%d)$"
local monthN, dayN = tonumber(monthS), tonumber(dayS)
dateS = yearS
until
monthN>0 and monthN<=12 -- real month
and os.date( -- real date check
-- be aware that this check is unnecessary because it only affects the 13th century
"%Y-%m-%d"
,os.time{
|