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('2021-08-24', '1st Single', 'BOY FRiEND / Adventure!', 'momograci') ReleaseInsert('2021-08-25', '4th Album', 'Ashita wa Hareruyo', 'Haruka to Miyuki') ReleaseInsert('2021-08-25', '4th Album', '89 / 99', 'marble≠marble') ReleaseInsert('2021-08-25', '4th Album', 'Kotoba Asobi', 'TRUE') ReleaseInsert('2021-08-25', '9th Single', 'Weekend Citron', '=LOVE') ReleaseInsert('2021-08-25', '1st Single', 'Forever and Ever', 'Amemoyou no Solaris') ReleaseInsert('2021-08-25', '30th Single', 'Gunjou Runaway', 'Hey! Say! JUMP') ReleaseInsert('2021-08-25', '2nd Single', 'Baddest', 'Higuchi Kaede') ReleaseInsert('2021-08-25', '3rd Single', 'Full Time Dive', 'KAQRIYOTERROR') ReleaseInsert('2021-08-25', '1st Single', 'Loose-leaf / Hiyoku Renri', 'Kisaragi Megumi') ReleaseInsert('2021-08-25', '46th Single', 'Mirai (L\'Arc~en~Ciel)|Mirai', 'L\'Arc~en~Ciel') ReleaseInsert('2021-08-25', '34th Single', 'Sonic Boom', 'Lead') ReleaseInsert('2021-08-25', '4th Single', 'Mirai Yohou Hallelujah! / Tiny Stars', 'Liella\!') ReleaseInsert('2021-08-25', '5th Single', 'THE STRUGGLE IS REAL', 'Meme Tokyo') ReleaseInsert('2021-08-25', '2nd Single', 'Like Flames', 'MindaRyn') ReleaseInsert('2021-08-25', '29th Single', 'WELCOME☆Natsuzora Peace!!!!!', 'SUPER☆GiRLS') ReleaseInsert('2021-08-25', '1st Single', 'Setsuna Strings', 'Tebasaki Sensation') ReleaseInsert('2021-08-25', '11th Single', 'Reincarnate', 'Terashima Takuma') ReleaseInsert('2021-08-25', '2nd Single', 'Borderless', 'THIS IS JAPAN') ReleaseInsert('2021-08-25', '11th Single', 'Love Song', 'Uru') ReleaseInsert('2021-08-25', '1st Single', 'Lil\' Shine bright Three oclock', 'Yukinojou Oyatsu') ReleaseInsert('2021-08-25', '1st Digital Single', 'Negative Meister', 'Nikoshama') ReleaseInsert('2021-08-27', '39th Single', 'Just the truth', 'Kuribayashi Minami|Minami') ReleaseInsert('2021-08-28', '3rd Single', 'Sono Saki wo Ou', 'Accént') ReleaseInsert('2021-08-28', '7th Single', 'Ifu -Deception', 'FRUITPOCHETTE') ReleaseInsert('2021-08-30', '12th Album', 'SHOWDOWN', 'SHOW-YA') ReleaseInsert('2021-08-31', '1st Single', 'EXPLOSION', 'MeWenow') ReleaseInsert('2021-09-01', '2nd Album', 'Attitude', 'B.O.L.T') ReleaseInsert('2021-09-01', '1st Album', 'DIALOGUE＋1', 'DIALOGUE+') ReleaseInsert('2021-09-01', '6th Album', 'FATE (Vickeblanka)|FATE', 'Vickeblanka') ReleaseInsert('2021-09-01', '1st Album', 'Orange-iro ni Kanpai', 'SARD UNDERGROUND') ReleaseInsert('2021-09-01', '11th Single', 'Natsu to Kimi no Uta', 'A.B.C-Z') ReleaseInsert('2021-09-01', '2nd Single', 'Shion (Myuk)|Shion', 'Myuk') ReleaseInsert('2021-09-01', '1st Single', 'Tsumari wa Itsumo Kujikenai!', 'NEGI☆U') ReleaseInsert('2021-09-01', '4th Single', 'Who are you? / Seiza Shite Futari', 'PELICAN FANCLUB') ReleaseInsert('2021-09-03', '1st Digital EP', 'Asano EP', 'TEAM SHACHI') ReleaseInsert('2021-09-03', '4th Digital Single', 'Club Moon', 'femme fatale') ReleaseInsert('2021-09-08', '20th Single', 'HADASHi NO STEP', 'LiSA') ReleaseInsert('2021-09-08', '18th Single', 'Merry-Go-Round', 'MAN WITH A MISSION') ReleaseInsert('2021-09-08', '8th Single', 'Sekai no Himitsu', 'Sayuri') ReleaseInsert('2021-09-15', '4th Album', 'Re Bon Voyage', 'TrySail') ReleaseInsert('2021-09-15', '3rd Mini Album', 'SHOWER', 'Muto Ayami') ReleaseInsert('2021-09-15', '23rd Single', 'Careless', 'ClariS') ReleaseInsert('2021-09-15', '11th Single', 'Psylum no Shoumei / Mukai kaze o Tsukinukute', 'Houkago Princess') ReleaseInsert('2021-09-15', '19th Single', 'Heading to Over - Version:Free -', 'OLDCODEX') ReleaseInsert('2021-09-15', '4th Digital Single', 'Nobody Knows You', 'KEIKO') ReleaseInsert('2021-09-21', '1st Single', 's u s u m e ! / Knock-Knock', 'PATI PATI CANDY...☆') ReleaseInsert('2021-09-22', '2nd Album', 'Equal (Uchida Yuma)|Equal', 'Uchida Yuma') ReleaseInsert('2021-09-22', '3rd Mini Album', 're-union', 'Little Glee Monster') ReleaseInsert('2021-09-22', '3rd EP', 'Take off,', 'WATWING') ReleaseInsert('2021-09-22', '31st Single', 'KU-RU-KU-RU Cruller!', 'Aqours') ReleaseInsert('2021-09-22', '21st Single', 'Shoudouteki S/K/S/D', 'Dempagumi.inc') ReleaseInsert('2021-09-22', '13th Single', 'Heavenlyheaven', 'Zenbu Kimi no Sei da.') ReleaseInsert('2021-09-29', '11th Album', 'Yume wo Kikasete', 'Soraru') ReleaseInsert('2021-09-29', '14th Single', 'Moonlight Magic', 'Hanazawa Kana') ReleaseInsert('2021-09-29', '3rd Single', 'Let us sing "Peaky!"', 'Peaky P-Key')

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