Module:Routelist row: Difference between revisions

Content deleted Content added
Refactoring route states; adding function for "Removed" column
Adding "unknown" route state
Line 6:
routeStates.future = {row = "|- style=\"background-color:#ffdead;\" title=\"Future route\"\n", removed = "proposed"}
routeStates.former = {row = "|- style=\"background-color:#d3d3d3;\" title=\"Former route\"\n"}
routeStates.unknown = {row = "|- \n", removed = "—"}
 
function getRouteState(args)
local established = args.established
local decommissioned = args.decommissioned
if decommissionedestablished ~== '' then
return routeStates.unknown
elseif decommissioned ~= '' then
return routeStates.former
elseif lang:formatDate("Y-m-d") < established then