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('2021-01-05', '1st Single', 'Saishuu Zenya / MONSTER Beats', 'Artemis no Tsubasa') ReleaseInsert('2021-01-06', '1st Album', '1ST', 'SixTONES') ReleaseInsert('2021-01-06', '1st Single', 'Peak Peaky & Peaky!!', 'Peaky P-Key') ReleaseInsert('2021-01-06', '16th Single', 'Douraku Shinjou', 'DOES') ReleaseInsert('2021-01-06', '6th Digital Single', 'Kaibutsu', 'YOASOBI') ReleaseInsert('2021-01-12', 'Debut Single', 'LIFEGAME', 'Runup!!') ReleaseInsert('2021-01-13', 'Debut Single', 'Chase the core', 'Sakuma Takao') ReleaseInsert('2021-01-13', '2nd Single', 'Bloom Bloom', 'Morfonica') ReleaseInsert('2021-01-13', '16th Single', 'Storyteller', 'TRUE') ReleaseInsert('2021-01-13', '19th Single', 'dawn', 'LiSA') ReleaseInsert('2021-01-13', '22nd Single', 'Gesshoku Chainon', 'Momoiro Clover Z') ReleaseInsert('2021-01-13', '35th Single', 'Shinsekai', 'FLOW') ReleaseInsert('2021-01-20', '1st Best Album', 'GRADATI∞N', 'Little Glee Monster') ReleaseInsert('2021-01-20', '6th Album', 'SiX', 'Da-iCE') ReleaseInsert('2021-01-20', '3rd Single', 'Grandeur', 'Snow Man') ReleaseInsert('2021-01-20', '11th Single', 'Birthday', 'ROSARIO+CROSS') ReleaseInsert('2021-01-20', '11th Single', 'ZEAL of proud', 'Roselia') ReleaseInsert('2021-01-27', '1st Single', 'Identity (Akiyama Kiro)|Identity', 'Akiyama Kiro') ReleaseInsert('2021-01-27', '3rd Single', 'Tough Heart', 'Kobayashi Aika') ReleaseInsert('2021-01-27', '5th Single', 'Marionette Coup d&#39;État', 'Fuchigami Mai') ReleaseInsert('2021-01-27', '5th Single', 'Haru no Tonari', 'Sasaki Eri') ReleaseInsert('2021-01-27', '5th Single', 'keep weaving your spider way', 'Azuna Riko') ReleaseInsert('2021-01-27', '5th Single', 'Kokoro Dare ni mo', 'Game Jikkyosha Wakuwaku Band') ReleaseInsert('2021-01-27', '6th Single', 'mind of Prominence', 'RAISE A SUILEN') ReleaseInsert('2021-01-27', '7th Single', 'Compass Song', 'Kano') ReleaseInsert('2021-01-27', '7th Single', 'SHAKE!SHAKE!SHAKE!', 'Uchida Yuma') ReleaseInsert('2021-01-27', '9th Single', 'Seize The Day', 'Asaka') ReleaseInsert('2021-01-27', '15th Single', 'LIGHT of JUSTICE', 'Morikubo Showtaro') ReleaseInsert('2021-01-27', '27th Single', 'Nakiwarai no Episode', 'Hata Motohiro') ReleaseInsert('2021-01-27', '38th Single', 'Zankokuna Yume to Nemure', 'Kuribayashi Minami')

ReleaseInsert('2021-02-03', '1st Album', 'Kimi ga Ita Kara', 'PiXMiX') ReleaseInsert('2021-02-03', '2nd Single', 'Jinsei Easy?', 'DIALOGUE+') ReleaseInsert('2021-02-03', '3rd Single', 'Ayafuwa Asterisk', 'DIALOGUE+') ReleaseInsert('2021-02-03', '13th Single', 'Oni no Mori / Minikui Ikimono', 'CHiCO with HoneyWorks') ReleaseInsert('2021-02-03', '14th Single', 'Kemono Michi', 'Ono Daisuke') ReleaseInsert('2021-02-03', '14th Single', 'Shougeki', 'Ando Yuko') ReleaseInsert('2021-02-03', '17th Single', '-Shirushi-', 'Sasaki Sayaka') ReleaseInsert('2021-02-10', '1st Best Album', 'SEKAI NO OWARI 2010-2019', 'SEKAI NO OWARI') ReleaseInsert('2021-02-10', '2nd Single', 'Yume de Sekai wo Kaeru nara', 'ARCANA PROJECT') ReleaseInsert('2021-02-10', '3rd Single', 'Black Coffee', 'SARD UNDERGROUND') ReleaseInsert('2021-02-10', '28th Single', 'Hello, Goodbye', 'TOKYO GIRLS&#39; STYLE') ReleaseInsert('2021-02-17', '1st Mini Album', 'VIVID VICE', 'Who-ya Extended') ReleaseInsert('2021-02-17', '9th Single', 'Nemophila', 'coalamode.') ReleaseInsert('2021-02-17', '26th Single', 'Wanna Fly?', 'Ishida Yoko') ReleaseInsert('2021-02-24', 'Debut Single', 'Long shot', 'Maeshima Mayu') ReleaseInsert('2021-02-24', '3rd Single', 'Give It Up?', '96neko') ReleaseInsert('2021-02-24', '4th Single', 'STORYSEEKER', 'STEREO DIVE FOUNDATION') ReleaseInsert('2021-02-24', '33rd Single', 'BAKU', 'Ikimonogakari') ReleaseInsert('2021-02-24', '4th Album', 'vämjelseriter', 'NECRONOMIDOL')

ReleaseInsert('2021-03-03', '4th Single', 'Believe in you', 'nonoc')

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 --