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 "1x17", -- 2015-07-23 19:00 PDT "1x18", -- 2015-07-30 19:00 PDT "1x19", -- 2015-08-06 19:00 PDT "1x20", -- 2015-08-13 19:00 PDT "1x21", -- 2015-08-20 19:00 PDT "1x22", -- 2015-08-27 19:00 PDT "1x23", -- 2015-09-10 19:00 PDT "1x24", -- 2015-09-17 19:00 PDT "1x25", -- 2015-09-24 19:00 PDT "1x26", -- 2015-10-01 19:00 PDT "Sx02", -- 2015-10-03 21:00 PDT "1x27", -- 2015-10-08 19:00 PDT "1x28", -- 2015-10-15 19:00 PDT "Sx03", -- 2015-10-19 "1x29", -- 2015-10-22 19:00 PDT "1x30", -- 2015-10-29 19:00 PDT "1x31", -- 2015-11-05 19:00 PST "Sx04", -- 2015-11-05 19:00 PST "1x32", -- 2015-11-12 19:00 PST "1x33", -- 2015-11-19 19:00 PST "1x34", -- 2015-12-03 19:00 PST "1x35", -- 2015-12-10 19:00 PST "Sx05", -- 2015-12-10 19:00 PST "1x36", -- 2015-12-17 19:00 PST "Sx06", -- 2016-01-06 "1x37", -- 2016-01-07 19:00 PST "1x38", -- 2016-01-14 19:00 PST "1x39", -- 2016-01-21 19:00 PST "1x40", -- 2016-01-28 19:00 PST "1x41", -- 2016-02-04 19:00 PST "1x42", -- 2016-02-11 19:00 PST "1x43", -- 2016-02-18 19:00 PST "Sx07", -- 2016-02-20 14:45 PST "Sx08", -- 2016-02-25 19:00 PST "1x44", -- 2016-03-10 19:00 PST "1x45", -- 2016-03-17 19:00 PDT "1x46", -- 2016-03-24 19:00 PDT "1x47", -- 2016-03-31 19:00 PDT "1x48", -- 2016-04-07 19:00 PDT "1x49", -- 2016-04-14 19:00 PDT "Sx09", -- 2016-04-18 19:00 PDT "1x50", -- 2016-04-21 19:00 PDT "1x51", -- 2016-04-28 19:00 PDT "1x52", -- 2016-05-05 19:00 PDT "1x53", -- 2016-05-12 19:00 PDT "1x54", -- 2016-05-19 19:00 PDT "Sx10", -- 2016-05-26 19:00 PDT "1x55", -- 2016-06-02 19:00 PDT "1x56", -- 2016-06-09 19:00 PDT "1x57", -- 2016-06-16 19:00 PDT "1x58", -- 2016-06-23 19:00 PDT "Sx11", -- 2016-06-25 17:00 PDT "Sx12", -- 2016-06-30 19:00 PDT "1x59", -- 2016-07-07 19:00 PDT "1x60", -- 2016-07-14 19:00 PDT "Sx13", -- 2016-07-23 12:30 PDT "Sx14", -- 2016-07-23 19:30 PDT "1x61", -- 2016-07-28 19:00 PDT "1x62", -- 2016-08-06 20:00 EDT "1x63", -- 2016-08-11 19:00 PDT "1x64", -- 2016-08-18 19:00 PDT "1x65", -- 2016-08-25 19:00 PDT "Sx15", -- 2016-09-01 19:00 PDT "1x66", -- 2016-09-08 19:00 PDT "1x67", -- 2016-09-15 19:00 PDT "1x68", -- 2016-09-22 19:00 PDT "1x69", -- 2016-09-29 19:00 PDT "1x70", -- 2016-10-06 19:00 PDT "1x71", -- 2016-10-13 19:00 PDT "1x72", -- 2016-10-20 19:00 PDT "1x73", -- 2016-10-27 19:00 PDT "1x74", -- 2016-11-03 19:00 PDT "1x75", -- 2016-11-10 19:00 PST "TMx01",-- 2016-11-15 19:00 PST "1x76", -- 2016-11-17 19:00 PST "TMx02",-- 2016-11-22 19:00 PST "TMx03",-- 2016-11-29 19:00 PST "1x77", -- 2016-12-01 19:00 PST "TMx04",-- 2016-12:06 19:00 PST "1x78", -- 2016-12-08 19:00 PST "TMx05",-- 2016-12-13 19:00 PST "1x79", -- 2016-12-15 19:00 PST "TMx06",-- 2016-12-20 19:00 PST "TMx07",-- 2017-01-03 19:00 PST "1x80", -- 2017-01-05 19:00 PST "TMx08",-- 2017-01-10 19:00 PST "1x81", -- 2017-01-12 19:00 PST "TMx09",-- 2017-01-17 19:00 PST "1x82", -- 2017-01-19 19:00 PST "TMx10",-- 2017-01-24 19:00 PST "1x83", -- 2017-01-26 19:00 PST "TMx11",-- 2017-01-31 19:00 PST "1x84", -- 2017-02-02 19:00 PST "TMx12",-- 2017-02-07 19:00 PST "1x85", -- 2017-02-09 19:00 PST "1x86", -- 2017-02-16 19:00 PST "TMx13",-- 2017-02-21 19:00 PST "1x87", -- 2017-02-23 19:00 PST "TMx14",-- 2017-02-28 19:00 PST "1x88", -- 2017-03-02 19:00 PST "TMx15",-- 2017-03-07 19:00 PST "1x89", -- 2017-03-09 19:00 PST "TMx16",-- 2017-03-14 19:00 PDT "1x90", -- 2017-03-16 19:00 PDT "TMx17",-- 2017-03-21 19:00 PDT "1x91", -- 2017-03-23 19:00 PDT "TMx18",-- 2017-03-28 19:00 PDT "1x92", -- 2017-03-30 19:00 PDT "TMx19",-- 2017-04-01 14:00 PDT "1x93", -- 2017-04-06 19:00 PDT "TMx20",-- 2017-04-11 19:00 PDT "1x94", -- 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 "1x95", -- 2017-04-27 19:00 PDT "Sx18", -- 2017-05-02 19:00 PDT "1x96", -- 2017-05-04 19:00 PDT "TMx23",-- 2017-05-09 19:00 PDT "1x97", -- 2017-05-11 19:00 PDT "TMx24",-- 2017-05-16 19:00 PDT "1x98", -- 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 "1x99", -- 2017-06-01 19:00 PDT "TMx27",-- 2017-06-06 19:00 PDT "1x100",-- 2017-06-08 19:00 PDT "TMx28",-- 2017-06-13 19:00 PDT "1x101",-- 2017-06-15 19:00 PDT "TMx29",-- 2017-06-20 19:00 PDT "1x102",-- 2017-06-22 19:00 PDT "TMx30",-- 2017-06-27 19:00 PDT "1x103",-- 2017-06-29 19:00 PDT "1x104",-- 2017-07-06 19:00 PDT "TMx31",-- 2017-07-11 19:00 PDT "1x105",-- 2017-07-13 19:00 PDT "TMx32",-- 2017-07-18 19:00 PDT "Sx20", -- 2017-07-22 10:30 PDT "1x106",-- 2017-07-27 19:00 PDT "TMx33",-- 2017-08-01 19:00 PDT "1x107",-- 2017-08-03 19:00 PDT "1x108",-- 2017-08-10 19:00 PDT "TMx34",-- 2017-08-15 19:00 PDT "1x109",-- 2017-08-18 18:00 PDT "TMx35",-- 2017-08-22 19:00 PDT "1x110",-- 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 "1x111",-- 2017-09-14 19:00 PDT "TMx39",-- 2017-09-19 19:00 PDT "1x112",-- 2017-09-21 19:00 PDT "TMx40",-- 2017-09-26 19:00 PDT "1x113",-- 2017-09-28 19:00 PDT "Sx22", -- 2017-10-03 "TMx41",-- 2017-10-03 19:00 PDT "1x114",-- 2017-10-05 19:00 PDT "Sx23", -- 2017-10-09 "TMx42",-- 2017-10-10 19:00 PDT "1x115",-- 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 "2x01", -- 2018-01-11 19:00 PST "TMx49",-- 2018-01-16 19:00 PST "2x02", -- 2018-01-18 19:00 PST "TMx50",-- 2018-01-23 19:00 PST "2x03", -- 2018-01-25 19:00 PST "TMx51",-- 2018-01-30 19:00 PST "2x04", -- 2018-02-01 19:00 PST "TMx52",-- 2018-02-06 19:00 PST "2x05", -- 2018-02-08 19:00 PST "TMx53",-- 2018-02-13 19:00 PST "2x06", -- 2018-02-15 19:00 PST "TMx54",-- 2018-02-20 19:00 PST "2x07", -- 2018-02-22 19:00 PST "TMx55",-- 2018-02-27 19:00 PST "2x08", -- 2018-03-01 19:00 PST "TMx56",-- 2018-03-06 19:00 PST "2x09", -- 2018-03-08 19:00 PST "TMx57",-- 2018-03-13 19:00 PDT "2x10", -- 2018-03-15 19:00 PDT "TMx58",-- 2018-03-20 19:00 PDT "2x11", -- 2018-03-22 19:00 PDT "TMx59",-- 2018-03-27 19:00 PDT "2x12", -- 2018-03-29 19:00 PDT "TMx60",-- 2018-04-03 19:00 PDT "2x13", -- 2018-04-05 19:00 PDT "TMx61",-- 2018-04-10 19:00 PDT "2x14", -- 2018-04-12 19:00 PDT "TMx62",-- 2018-04-17 19:00 PDT "2x15", -- 2018-04-19 19:00 PDT "TMx63",-- 2018-04-24 19:00 PDT "2x16", -- 2018-04-26 19:00 PDT "TMx64",-- 2018-05-01 19:00 PDT "2x17", -- 2018-05-03 19:00 PDT "TMx65",-- 2018-05-08 19:00 PDT "2x18", -- 2018-05-10 19:00 PDT "TMx66",-- 2018-05-15 19:00 PDT "2x19", -- 2018-05-17 19:00 PDT "TMx67",-- 2018-05-22 19:00 PDT "2x20", -- 2018-05-24 19:00 PDT "TMx68",-- 2018-05-29 19:00 PDT "2x21", -- 2018=05-31 19:00 PDT "TMx69",-- 2018-06-05 19:00 PDT "2x22", -- 2018-06-07 19:00 PDT "TMx70",-- 2018-06-12 19:00 PDT "2x23", -- 2018-06-14 19:00 PDT "TMx71",-- 2018-06-19 19:00 PDT "2x24", -- 2018-06-21 19:00 PDT "TMx72",-- 2018-06-26 19:00 PDT "2x25", -- 2018-06-28 19:00 PDT "TMx73",-- 2018-07-10 19:00 PDT "2x26", -- 2018-07-12 19:00 PDT "TMx74",-- 2018-07-17 19:00 PDT "2x27", -- 2018-07-19 19:00 PDT "TMx75",-- 2018-07-24 19:00 PDT "2x28", -- 2018-07-26 19:00 PDT "TMx76",-- 2018-07-31 19:00 PDT "2x29", -- 2018-08-03 18:00 PDT "Sx34", -- 2018-08-07 17:00 PDT "TMx77",-- 2018-08-07 19:00 PDT "2x30", -- 2018-08-09 19:00 PDT "Sx35", -- 2018-08-10 19:00 PDT "TMx78",-- 2018-08-14 19:00 PDT "2x31", -- 2018-08-16 19:00 PDT "TMx79",-- 2018-08-21 19:00 PDT "2x32", -- 2018-08-23 19:00 PDT "TMx80",-- 2018-08-28 19:00 PDT "Sx36", -- 2018-08-31 19:00 PDT "2x33", -- 2018-09-06 19:00 PDT "TMx81",-- 2018-09-11 19:00 PDT "2x34", -- 2018-09-13 19:00 PDT "TMx82",-- 2018-09-18 19:00 PDT "2x35", -- 2018-09-20 19:00 PDT "Sx37", -- 2018-09-21 19:00 PDT "TMx83",-- 2018-09-25 19:00 PDT "2x36", -- 2018-09-27 19:00 PDT "TMx84",-- 2018-10-02 19:00 PDT "2x37", -- 2018-10-04 19:00 PDT "TMx85",-- 2018-10-09 19:00 PDT "2x38", -- 2018-10-11 19:00 PDT "TMx86",-- 2018-10-16 19:00 PDT "2x39", -- 2018-10-18 19:00 PDT "TMx87",-- 2018-10-23 19:00 PDT "Sx38", -- 2018-10-25 19:00 PDT "TMx88",-- 2018-10-30 19:00 PDT "2x40", -- 2018-11-01 19:00 PDT "TMx89",-- 2018-11-06 19:00 PST "2x41", -- 2018-11-08 19:00 PST "TMx90",-- 2018-11-13 19:00 PST "2x42", -- 2018-11-15 19:00 PST "TMx91",-- 2018-11-20 19:00 PST "Sx39", -- 2018-11-23 19:00 PST "Sx40", -- 2018-11-27 19:00 PST "2x43", -- 2018-11-29 19:00 PST "TMx92",-- 2018-12-04 19:00 PST "2x44", -- 2018-12-06 19:00 PST "TMx93",-- 2018-12-11 19:00 PST "2x45", -- 2018-12-13 19:00 PST "TMx94",-- 2018-12-18 19:00 PST "2x46", -- 2018-12-20 19:00 PST "Sx41", -- 2018-12-21 19:00 PST "TMx95",-- 2019-01-08 19:00 PST "2x47", -- 2019-01-10 19:00 PST "TMx96",-- 2019-01-15 19:00 PST "2x48", -- 2019-01-17 19:00 PST "TMx97",-- 2019-01-22 19:00 PST "2x49", -- 2019-01-24 19:00 PST "TMx98",-- 2019-01-29 19:00 PST "2x50", -- 2019-01-31 19:00 PST "TMx99",-- 2019-02-05 19:00 PST "2x51", -- 2019-02-14 19:00 PST "TMx100",--2019-02-19 19:00 PST "2x52", -- 2019-02-21 19:00 PST "Sx42", -- 2019-02-22 19:00 PST "TMx101",--2019-02-26 19:00 PST "2x53", -- 2019-02-28 19:00 PST "TMx102",--2019-03-05 19:00 PST "2x54", -- 2019-03-07 19:00 PST "TMx103",--2019-03-12 19:00 PDT "2x55", -- 2019-03-14 19:00 PDT "TMx104",--2019-03-19 19:00 PDT "2x56", -- 2019-03-21 19:00 PDT "TMx105",--2019-03-26 19:00 PDT "2x57", -- 2019-04-04 19:00 PDT "TMx106",--2019-04-09 19:00 PDT "2x58", -- 2019-04-11 19:00 PDT "TMx107",--2019-04-16 19:00 PDT "2x59", -- 2019-04-18 19:00 PDT "TMx108",--2019-04-23 19:00 PDT "2x60", -- 2019-04-25 19:00 PDT "TMx109",--2019-04-30 19:00 PDT "2x61", -- 2019-05-02 19:00 PDT "TMx110",--2019-05-07 19:00 PDT "2x62", -- 2019-05-09 19:00 PDT "TMx111",--2019-05-14 19:00 PDT "2x63", -- 2019-05-16 19:00 PDT "TMx112",--2019-05-21 19:00 PDT "Sx43", -- 2019-05-23 10:00 PDT "2x64", -- 2019-05-23 19:00 PDT "TMx113",--2019-05-28 19:00 PDT "2x65", -- 2019-05-30 19:00 PDT "Sx44", -- 2019-05-31 19:00 PDT "TMx114",--2019-06-04 19:00 PDT "2x66", -- 2019-06-06 19:00 PDT "TMx115",--2019-06-11 19:00 PDT "2x67", -- 2019-06-13 19:00 PDT "TMx116",--2019-06-18 19:00 PDT "2x68", -- 2019-06-20 19:00 PDT "Sx45", -- 2019-06-21 19:00 PDT "TMx117",--2019-06-27 19:00 PDT "2x69", -- 2019-06-29 19:00 PDT "TMx118",--2019-07-09 19:00 PDT "2x70", -- 2019-07-11 19:00 PDT "TMx119",--2019-07-16 19:00 PDT "2x71", -- 2019-07-18 19:00 PDT "TMx120",--2019-07-24 19:00 PDT "2x72", -- 2019-07-25 19:00 PDT "Sx46", -- 2019-07-29 19:00 PDT "TMx121",--2019-07-30 19:00 PDT "2x73", -- 2019-08-02 16:00 PDT "TMx122",--2019-08-06 19:00 PDT "2x74", -- 2019-08-08 19:00 PDT "TMx123",--2019-08-13 19:00 PDT "2x75", -- 2019-08-15 19:00 PDT "TMx124",--2019-08-20 19:00 PDT "2x76", -- 2019-08-22 19:00 PDT "Sx47", -- 2019-08-29 19:00 PDT "2x77", -- 2019-09-05 19:00 PDT "TMx125",--2019-09-10 19:00 PDT "2x78", -- 2019-09-19 19:00 PDT "TMx126",--2019-09-24 19:00 PDT "2x79", -- 2019-09-26 19:00 PDT "TMx127",--2019-10-01 19:00 PDT "Sx48", -- 2019-10-03 19:00 PDT "2x80", -- 2019-10-10 19:00 PDT "TMx128",--2019-10-15 19:00 PDT "2x81", -- 2019-10-17 19:00 PDT "TMx129",--2019-10-21 19:00 PDT "2x82", -- 2019-10-24 19:00 PDT "TMx130",--2019-10-29 19:00 PDT "2x83", -- 2019-10-31 19:00 PDT "TMx131",--2019-11-05 19:00 PST "2x84", -- 2019-11-07 19:00 PST "TMx132",--2019-11-12 19:00 PST "2x85", -- 2019-11-14 19:00 PST "TMx133",--2019-11-19 19:00 PST "2x86", -- 2019-11-21 19:00 PST "TMx134",--2019-11-26 19:00 PST "Sx49", -- 2019-11-29 19:00 PST "2x87", -- 2019-12-05 19:00 PST "TMx135",--2019-12-10 19:00 PST "2x88", -- 2019-12-12 19:00 PST "TMx136",--2019-12-17 19:00 PST "Sx50", -- 2019-12-18 17:00 PST "2x89", -- 2019-12-19 19:00 PST "2x90", -- 2020-01-09 19:00 PST "TMx137",--2020-01-14 19:00 PST "2x91", -- 2020-01-16 19:00 PST "TMx138",--2020-01-21 19:00 PST "2x92", -- 2020-01-23 19:00 PST "TMx139",--2020-01-28 19:00 PST "2x93", -- 2020-01-30 19:00 PST "TMx140",--2020-02-04 19:00 PST "2x94", -- 2020-02-06 19:00 PST "TMx141",--2020-02-11 19:00 PST "2x95", -- 2020-02-13 19:00 PST "Sx51", -- 2020-02-14 19:00 PST "TMx142",--2020-02-18 19:00 PST "2x96", -- 2020-02-20 19:00 PST "TMx143",--2020-02-25 19:00 PST "2x97", -- 2020-02-27 19:00 PST "TMx144",--2020-03-03 19:00 PST "2x98", -- 2020-03-05 19:35 PST "TMx145",--2020-03-10 19:00 PDT "2x99", -- 2020-03-12 19:00 PDT "Sx52", -- 2020-03-16 19:00 PDT "Sx53", -- 2020-03-25 19:00 PDT "2x100",-- 2020-07-02 19:00 PDT "2x101",-- 2020-07-09 19:00 PDT "2x102",-- 2020-07-16 19:00 PDT "2x103",-- 2020-07-23 19:00 PDT "2x104",-- 2020-07-30 19:00 PDT "2x105",-- 2020-08-06 19:00 PDT "2x106",-- 2020-08-13 19:00 PDT "2x107",-- 2020-08-27 19:00 PDT "2x108",-- 2020-09-03 19:00 PDT "2x109",-- 2020-09-10 19:00 PDT "TMx146",--2020-09-15 19:00 PDT "2x110",-- 2020-09-17 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