FANDOM


 
local p = {}
 
function p.airdateOrder(frame, reference)
    local epSwitcher = require("Module:CorvusTheFeatherbrain/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
    }
 
    if order == "next" then CxEE = p.nextEp(epArray, CxEE)
    elseif order == "prev" then CxEE = p.prevEp(epArray, CxEE) end
 
    --return CxEE
    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 = "{{CorvusTheFeatherbrain/Ep|" .. epArray[index] .. "}}"
    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 = "{{CorvusTheFeatherbrain/Ep|" .. epArray[index] .. "}}"
    else CxEE = "N/A" end
 
    return CxEE
 
end
 
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.