Module:Release

local p = {}

D = {} T = {} N = {} A = {}

function ReleaseInsert(Date, Type, Name, Artist) table.insert(D, Date) table.insert(T, Type) table.insert(N, Name) table.insert(A, Artist) end

--These should go in chronological order. --Please note that if an artist name includes a single quote, --it needs to be written as \' so the quote is not interpreted as the end of the name. --ReleaseInsert('yyyy-mm-dd', 'Number+Type', 'Release Name', 'Artist')

ReleaseInsert('2022-04-06', '10th Single', 'Ao 100-iro', 'Ito Miku') ReleaseInsert('2022-04-13', '17th Single', 'kaleido proud fiesta', 'UNISON SQUARE GARDEN') ReleaseInsert('2022-04-20', '4th Single', 'OveR', 'Tomita Miyu') ReleaseInsert('2022-04-20', '5th Single', 'Hi wa Mata Noboru Kara', 'Ryokuoushoku Shakai') ReleaseInsert('2022-04-20', '7th Single', 'Awesome!', 'Maneki Kecak') ReleaseInsert('2022-04-20', '7th Single', 'Transcending Time', 'Void_Chords') ReleaseInsert('2022-04-20', '8th Single', 'Highlight Highlight', 'the peggies') ReleaseInsert('2022-04-20', '13th Single', 'Kikoeru?', 'Uchida Maaya') ReleaseInsert('2022-04-20', '21st Single', 'ASEED', 'ZAQ') ReleaseInsert('2022-04-27', '3rd Single', 'Silent Minority', 'Ito Kashitarou') ReleaseInsert('2022-04-27', '5th Single', 'Kaika_(cadode)|Kaika', 'cadode') ReleaseInsert('2022-04-27', '8th Single', 'Cherish', 'Ishihara Kaori') ReleaseInsert('2022-04-27', '11th Single', 'Be My Friend!!!', 'Ohashi Ayaka') ReleaseInsert('2022-04-27', '8th Single', 'S.O.S.', 'sweet ARMS') ReleaseInsert('2022-04-27', '20th Album', 'evolution (Unlucky Morpheus)|evolution', 'Unlucky Morpheus')

ReleaseInsert('2022-05-04', '2nd Single', 'Lyra_(LONGMAN)|Lyra', 'LONGMAN') ReleaseInsert('2022-05-11', '2nd Single', '0_(GOOD_ON_THE_REEL)|0', 'GOOD ON THE REEL') ReleaseInsert('2022-05-11', '14th Single', 'Love-Evidence', 'Amamiya Sora') ReleaseInsert('2022-05-11', '8th Single', 'selfish (Azuna Riko)|selfish', 'Azuna Riko') ReleaseInsert('2022-05-11', '35th Single', 'Narihibiku Kagiri', 'YUKI') ReleaseInsert('2022-05-18', '6th Single', 'Bring Back', 'MADKID') ReleaseInsert('2022-05-18', '16th Single', 'Bibitto Love', 'CHiCO with HoneyWorks') ReleaseInsert('2022-05-18', '21st Single', 'dawn of infinity', 'fripSide') ReleaseInsert('2022-05-25', 'Debut Single', 'Honey Jet Coaster', 'nasuo☆') ReleaseInsert('2022-05-25', '2nd Single', 'Route BLUE', 'Nakashima Yuki') ReleaseInsert('2022-05-25', '4th Single', 'Before the Nightmare', 'Takatsuki Kanako') ReleaseInsert('2022-05-25', '11th Single', 'OUTSIDERS', 'SawanoHiroyuki[nZk]') ReleaseInsert('2022-05-25', '20th Single', 'reincarnation / Tomoshibi Serenade', 'ChouCho')

ReleaseInsert('2022-06-01', '3rd Single', 'Secret Ceremony / No Time to Cast Anchor', 'millennium parade') ReleaseInsert('2022-06-01', '6th Single', 'BROKEN IDENTITY', 'Suzuki Minori') ReleaseInsert('2022-06-01', '18th Single', 'Koi wa Explosion (feat. Tamura Yukari)', 'Oishi Masayoshi') ReleaseInsert('2022-06-08', '5th Single', 'Ano Hi no Kotoba / Growing', 'Touyama Nao') ReleaseInsert('2022-06-08', '15th Single', 'Dekoboko', 'Yoshioka Kiyoe') ReleaseInsert('2022-06-22', '4th Single', 'Julietta', 'LIP×LIP')

ReleaseInsert('2022-07-13', '22nd Single', 'Dance In The Game', 'ZAQ') ReleaseInsert('2022-07-20', '40th Single', 'WITH', 'Kuribayashi Minami|Minami')

ReleaseInsert('2022-08-03', '3rd Single', 'Story_(Maeshima_Mayu)|story', 'Maeshima Mayu') ReleaseInsert('2022-08-03', '20th Single', 'Ichibanboshi Sonority', 'Iguchi Yuka')

function Ordinal(anumber) if anumber % 10 == 1 then return anumber .. "st" elseif anumber % 10 == 2 then if anumber%100==12 then return anumber .. "th" else return anumber .. "nd" end elseif anumber % 10 == 3 then if anumber%100==13 then return anumber .. "th" else return anumber .. "rd" end else return anumber .. "th" end end

function WhereDateXStarts(yyyymmdd) i = 0 repeat i=i+1 until D[i] >= yyyymmdd or i == table.getn(D) if D[i] < yyyymmdd then i = 1 end return i end

function WhereDateXEnds(yyyymmdd) i = 0 repeat i=i+1 until D[i] > yyyymmdd or i == table.getn(D) if D[i] > yyyymmdd then i = i-1 end return i end

function p.upcoming(frame) num_days = tonumber(frame.args.days or 7) num_min = tonumber(frame.args.min or 2) num_max = tonumber(frame.args.max or 999999) starting = frame.args.starting or os.date("%Y-%m-%d",os.time+32400) ending = os.date("%Y-%m-%d", os.time{year=string.sub(starting,1,4), month=string.sub(starting,6,7), day=string.sub(starting,9,10)}+86400*(num_days-1)) --output = "num_days: " .. num_days .. "num_min: " .. num_min .. "starting: " .. starting .. "ending: " ..ending --if 1>0 then return output end STARTBEGINS = WhereDateXStarts(starting) ENDENDS = WhereDateXEnds(ending) if (STARTBEGINS+num_max-1)0 then return output end LISTEND = table.getn(D)

--output = "starting: " .. starting .. " ending: " .. ending .. " STARTBEGINS: " .. STARTBEGINS .. " ENDENDS: " .. ENDENDS .. " LISTEND: " .. LISTEND lastday = 0 output = "" --First read group i = STARTBEGINS while i<= ENDENDS do       thisday = string.sub( D[i], 6, 10 ) if thisday ~= lastday then --It's a new day, something should be written. output = output .. ";" .. os.date("%B %e", os.time{year=2001, month=string.sub(D[i],6,7), day=string.sub(D[i],9,10)}) if thisday==starting then output = output .. ", Release Day!" else output = output .. "" end output = output .. "\n" end output = output .. ": '''" .. T[i] .. "''' " .. N[i] .. " by " .. A[i] .. "\n" lastday = thisday i=i+1 end return output -- .. " " .. os.clock end

function p.between(frame) startdate=frame.args[1] enddate=frame.args[2] typesearch = frame.args.typesearch if startdate > enddate then --You trying to screw things up? Well, we'll just flip 'em. temp = startdate startdate = enddate enddate = temp end output = "" STARTBEGINS = WhereDateXStarts(startdate) ENDENDS = WhereDateXEnds(enddate) --output = "ENDENDS: " .. ENDENDS --if 1>0 then return output end LISTEND = table.getn(D)

--output = "starting: " .. starting .. " ending: " .. ending .. " STARTBEGINS: " .. STARTBEGINS .. " ENDENDS: " .. ENDENDS .. " LISTEND: " .. LISTEND output = "" --First read group i = STARTBEGINS while i<= ENDENDS do       if string.find(string.lower(T[i]), string.lower(typesearch)) then output = output .. ":" .. D[i] .. " '''" .. T[i] .. "''' " .. N[i] .. " by " .. A[i] .. "\n" end i=i+1 end return output end

function p.random math.randomseed( os.time ) return "" .. N[math.random(" end

return p --