Module:AirdateOrder

local p = {} function p.airdateOrder(frame, reference) local epSwitcher = require("Module:Ep/Switcher") local reference = false local epName, CxEE = epSwitcher.epSwitcher(frame, reference) local order = frame.args["order"] epArray = { "1x01", -- 2015-03-12 19:00 PDT "1x02", -- 2015-03-19 19:00 PDT "1x03", -- 2015-03-26 19:00 PDT "1x04", -- 2015-04-02 19:00 PDT "1x05", -- 2015-04-09 19:00 PDT "1x06", -- 2015-04-16 19:00 PDT "1x07", -- 2015-04-23 19:00 PDT "1x08", -- 2015-04-30 19:00 PDT "1x09", -- 2015-05-07 19:00 PDT "1x10", -- 2015-05-14 19:00 PDT "1x11", -- 2015-05-21 19:00 PDT "1x12", -- 2015-05-28 19:00 PDT "1x13", -- 2015-06-04 19:00 PDT "1x14", -- 2015-06-11 19:00 PDT "1x15", -- 2015-06-25 19:00 PDT "1x16", -- 2015-07-02 19:00 PDT "Sx01", -- 2015-07-09 16:00 PDT "2x01", -- 2015-07-23 19:00 PDT "2x02", -- 2015-07-30 19:00 PDT "2x03", -- 2015-08-06 19:00 PDT "2x04", -- 2015-08-13 19:00 PDT "2x05", -- 2015-08-20 19:00 PDT "2x06", -- 2015-08-27 19:00 PDT "2x07", -- 2015-09-10 19:00 PDT "3x01", -- 2015-09-17 19:00 PDT "3x02", -- 2015-09-24 19:00 PDT "3x03", -- 2015-10-01 19:00 PDT "Sx02", -- 2015-10-03 21:00 PDT "3x04", -- 2015-10-08 19:00 PDT "3x05", -- 2015-10-15 19:00 PDT "Sx03", -- 2015-10-19 "3x06", -- 2015-10-22 19:00 PDT "3x07", -- 2015-10-29 19:00 PDT "3x08", -- 2015-11-05 19:00 PST "Sx04", -- 2015-11-05 19:00 PST "3x09", -- 2015-11-12 19:00 PST "3x10", -- 2015-11-19 19:00 PST "3x11", -- 2015-12-03 19:00 PST "3x12", -- 2015-12-10 19:00 PST "Sx05", -- 2015-12-10 19:00 PST "3x13", -- 2015-12-17 19:00 PST "Sx06", -- 2016-01-06 "3x14", -- 2016-01-07 19:00 PST "3x15", -- 2016-01-14 19:00 PST "4x01", -- 2016-01-21 19:00 PST "4x02", -- 2016-01-28 19:00 PST "4x03", -- 2016-02-04 19:00 PST "4x04", -- 2016-02-11 19:00 PST "4x05", -- 2016-02-18 19:00 PST "Sx07", -- 2016-02-20 14:45 PST "Sx08", -- 2016-02-25 19:00 PST "4x06", -- 2016-03-10 19:00 PST "4x07", -- 2016-03-17 19:00 PDT "4x08", -- 2016-03-24 19:00 PDT "4x09", -- 2016-03-31 19:00 PDT "4x10", -- 2016-04-07 19:00 PDT "4x11", -- 2016-04-14 19:00 PDT "Sx09", -- 2016-04-18 19:00 PDT "4x12", -- 2016-04-21 19:00 PDT "4x13", -- 2016-04-28 19:00 PDT "4x14", -- 2016-05-05 19:00 PDT "4x15", -- 2016-05-12 19:00 PDT "4x16", -- 2016-05-19 19:00 PDT "Sx10", -- 2016-05-26 19:00 PDT "4x17", -- 2016-06-02 19:00 PDT "4x18", -- 2016-06-09 19:00 PDT "5x01", -- 2016-06-16 19:00 PDT "5x02", -- 2016-06-23 19:00 PDT "Sx11", -- 2016-06-25 17:00 PDT "Sx12", -- 2016-06-30 19:00 PDT "5x03", -- 2016-07-07 19:00 PDT "5x04", -- 2016-07-14 19:00 PDT "Sx13", -- 2016-07-23 12:30 PDT "Sx14", -- 2016-07-23 19:30 PDT "5x05", -- 2016-07-28 19:00 PDT "5x06", -- 2016-08-06 20:00 EDT "5x07", -- 2016-08-11 19:00 PDT "5x08", -- 2016-08-18 19:00 PDT "5x09", -- 2016-08-25 19:00 PDT "Sx15", -- 2016-09-01 19:00 PDT "5x10", -- 2016-09-08 19:00 PDT "5x11", -- 2016-09-15 19:00 PDT "5x12", -- 2016-09-22 19:00 PDT "5x13", -- 2016-09-29 19:00 PDT "6x01", -- 2016-10-06 19:00 PDT "6x02", -- 2016-10-13 19:00 PDT "6x03", -- 2016-10-20 19:00 PDT "6x04", -- 2016-10-27 19:00 PDT "6x05", -- 2016-11-03 19:00 PDT "6x06", -- 2016-11-10 19:00 PST "TMx01",-- 2016-11-15 19:00 PST "6x07", -- 2016-11-17 19:00 PST "TMx02",-- 2016-11-22 19:00 PST "TMx03",-- 2016-11-29 19:00 PST "6x08", -- 2016-12-01 19:00 PST "TMx04",-- 2016-12:06 19:00 PST "6x09", -- 2016-12-08 19:00 PST "TMx05",-- 2016-12-13 19:00 PST "6x10", -- 2016-12-15 19:00 PST "TMx06",-- 2016-12-20 19:00 PST "TMx07",-- 2017-01-03 19:00 PST "6x11", -- 2017-01-05 19:00 PST "TMx08",-- 2017-01-10 19:00 PST "6x12", -- 2017-01-12 19:00 PST "TMx09",-- 2017-01-17 19:00 PST "6x13", -- 2017-01-19 19:00 PST "TMx10",-- 2017-01-24 19:00 PST "6x14", -- 2017-01-26 19:00 PST "TMx11",-- 2017-01-31 19:00 PST "6x15", -- 2017-02-02 19:00 PST "TMx12",-- 2017-02-07 19:00 PST "7x01", -- 2017-02-09 19:00 PST "7x02", -- 2017-02-16 19:00 PST "TMx13",-- 2017-02-21 19:00 PST "7x03", -- 2017-02-23 19:00 PST "TMx14",-- 2017-02-28 19:00 PST "7x04", -- 2017-03-02 19:00 PST "TMx15",-- 2017-03-07 19:00 PST "7x05", -- 2017-03-09 19:00 PST "TMx16",-- 2017-03-14 19:00 PDT "7x06", -- 2017-03-16 19:00 PDT "TMx17",-- 2017-03-21 19:00 PDT "7x07", -- 2017-03-23 19:00 PDT "TMx18",-- 2017-03-28 19:00 PDT "7x08", -- 2017-03-30 19:00 PDT "TMx19",-- 2017-04-01 14:00 PDT "7x09", -- 2017-04-06 19:00 PDT "TMx20",-- 2017-04-11 19:00 PDT "7x10", -- 2017-04-13 19:00 PDT "TMx21",-- 2017-04-18 19:00 PDT "Sx16", -- 2017-04-20 19:00 PDT "Sx17", -- 2017-04-25 16:00 PDT "TMx22",-- 2017-04-25 19:00 PDT "7x11", -- 2017-04-27 19:00 PDT "Sx18", -- 2017-05-02 19:00 PDT "7x12", -- 2017-05-04 19:00 PDT "TMx23",-- 2017-05-09 19:00 PDT "7x13", -- 2017-05-11 19:00 PDT "TMx24",-- 2017-05-16 19:00 PDT "7x14", -- 2017-05-18 19:00 PDT "TMx25",-- 2017-05-23 19:00 PDT "Sx19", -- 2017-05-25 19:00 PDT "TMx26",-- 2017-05-30 19:00 PDT "7x15", -- 2017-06-01 19:00 PDT "TMx27",-- 2017-06-06 19:00 PDT "8x01", -- 2017-06-08 19:00 PDT "TMx28",-- 2017-06-13 19:00 PDT "8x02", -- 2017-06-15 19:00 PDT "TMx29",-- 2017-06-20 19:00 PDT "8x03", -- 2017-06-22 19:00 PDT "TMx30",-- 2017-06-27 19:00 PDT "8x04", -- 2017-06-29 19:00 PDT "8x05", -- 2017-07-06 19:00 PDT "TMx31",-- 2017-07-11 19:00 PDT "8x06", -- 2017-07-13 19:00 PDT "TMx32",-- 2017-07-18 19:00 PDT "Sx20", -- 2017-07-22 10:30 PDT "8x07", -- 2017-07-27 19:00 PDT "TMx33",-- 2017-08-01 19:00 PDT "8x08", -- 2017-08-03 19:00 PDT "8x09", -- 2017-08-10 19:00 PDT "TMx34",-- 2017-08-15 19:00 PDT "8x10", -- 2017-08-18 18:00 PDT "TMx35",-- 2017-08-22 19:00 PDT "8x11", -- 2017-08-24 19:00 PDT "TMx36",-- 2017-08-29 19:00 PDT "Sx21", -- 2017-08-31 19:00 PDT "TMx37",-- 2017-09-05 19:00 PDT "TMx38",-- 2017-09-12 19:00 PDT "8x12", -- 2017-09-14 19:00 PDT "TMx39",-- 2017-09-19 19:00 PDT "8x13", -- 2017-09-21 19:00 PDT "TMx40",-- 2017-09-26 19:00 PDT "8x14", -- 2017-09-28 19:00 PDT "Sx22", -- 2017-10-03 "TMx41",-- 2017-10-03 19:00 PDT "8x15", -- 2017-10-05 19:00 PDT "Sx23", -- 2017-10-09 "TMx42",-- 2017-10-10 19:00 PDT "8x16", -- 2017-10-12 19:00 PDT "TMx43",-- 2017-10-17 19:00 PDT "Sx24", -- 2017-10-19 19:00 PDT "TMx44",-- 2017-10-24 19:00 PDT "Sx25", -- 2017-10-26 19:00 PDT "Sx26", -- 2017-11-02 19:00 PDT "TMx45",-- 2017-11-07 19:00 PST "Sx27", -- 2017-11-09 19:00 PST "TMx46",-- 2017-11-14 19:00 PST "Sx28", -- 2017-11-16 19:00 PST "TMx47",-- 2017-11-28 19:00 PST "Sx29", -- 2017-11-30 19:00 PST "Sx30", -- 2017-12-07 19:00 PST "TMx48",-- 2017-12-12 19:00 PST "Sx31", -- 2017-12-14 19:00 PST "Sx32", -- 2017-12-19 19:00 PST "Sx33", -- 2018-01-04 19:00 PST "9x01", -- 2018-01-11 19:00 PST "TMx49",-- 2018-01-16 19:00 PST "9x02", -- 2018-01-18 19:00 PST "TMx50",-- 2018-01-23 19:00 PST "9x03", -- 2018-01-25 19:00 PST "TMx51",-- 2018-01-30 19:00 PST "9x04", -- 2018-02-01 19:00 PST "TMx52",-- 2018-02-06 19:00 PST "9x05", -- 2018-02-08 19:00 PST "TMx53",-- 2018-02-13 19:00 PST "9x06", -- 2018-02-15 19:00 PST "TMx54",-- 2018-02-20 19:00 PST "9x07", -- 2018-02-22 19:00 PST "TMx55",-- 2018-02-27 19:00 PST "9x08", -- 2018-03-01 19:00 PST "TMx56",-- 2018-03-06 19:00 PST "9x09", -- 2018-03-08 19:00 PST "TMx57",-- 2018-03-13 19:00 PDT "9x10", -- 2018-03-15 19:00 PDT "TMx58",-- 2018-03-20 19:00 PDT "9x11", -- 2018-03-22 19:00 PDT "TMx59",-- 2018-03-27 19:00 PDT "9x12", -- 2018-03-29 19:00 PDT "TMx60",-- 2018-04-03 19:00 PDT "10x01",-- 2018-04-05 19:00 PDT "TMx61",-- 2018-04-10 19:00 PDT "10x02",-- 2018-04-12 19:00 PDT "TMx62",-- 2018-04-17 19:00 PDT "10x03",-- 2018-04-19 19:00 PDT "TMx63",-- 2018-04-24 19:00 PDT "10x04",-- 2018-04-26 19:00 PDT "TMx64",-- 2018-05-01 19:00 PDT "10x05",-- 2018-05-03 19:00 PDT "TMx65",-- 2018-05-08 19:00 PDT "10x06",-- 2018-05-10 19:00 PDT "TMx66",-- 2018-05-15 19:00 PDT "10x07",-- 2018-05-17 19:00 PDT "TMx67",-- 2018-05-22 19:00 PDT "10x08",-- 2018-05-24 19:00 PDT "TMx68",-- 2018-05-29 19:00 PDT "10x09",-- 2018=05-31 19:00 PDT }   if order == "next" then CxEE = p.nextEp(epArray, CxEE) elseif order == "prev" then CxEE = p.prevEp(epArray, CxEE) end return frame:preprocess(CxEE) end function p.nextEp(epArray, CxEE) local index = 0 local i = 1; while epArray[i] do       if epArray[i] == CxEE then index = i + 1 break end i = i + 1 end if epArray[index] then CxEE = "" else CxEE = "N/A" end return CxEE end function p.prevEp(epArray, CxEE) local index = 0 local i = 1; while epArray[i] do       if epArray[i] == CxEE then index = i - 1 break end i = i + 1 end if epArray[index] then CxEE = "" else CxEE = "N/A" end return CxEE end return p