Content deleted Content added
No edit summary |
No edit summary |
||
Line 15:
local function color(args, year)
if args[year .. '_color'] then
return args[year .. '_color']
end
for i = 1, 5 do
if args['range' .. i] then
local beginyear, endyear = string.find( args['range_' .. i], '^(%d{4}).+(%d{4})$' )
year = tonumber(year)
beginyear = tonumber(beginyear) or 0
endyear = tonumber(endyear) or 0
if year >= beginyear and year < endyear then
return args['range' .. i .. 'color']
end
end
end
return isYearReleased(args, year) and '#0BDA51' or '#228B22'
end
|