<% global.title = "Archives"; %> <%- include(`${private}/header.ejs`) %> ← Go back home

Archives

<% const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; archives = []; for (let archive of fs.readdirSync(serverRoot + "/archives")) { data = {}; if (archive.endsWith(".json")) { json = JSON.parse(fs.readFileSync(serverRoot + "/archives/" + archive).toString()) data.id = archive.substr(0, archive.length - 5); data.name = json.title; data.description = json.description.en; data.date = (json.date.substr(3) + json.date.substr(0, 2)) - 1 + 1; if (json.unreleased) { let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01"); data.info = "Never released · " + monthNames[date.getMonth()] + " " + date.getFullYear(); } else { let date = new Date(json.date.substr(3) + "-" + json.date.substr(0, 2) + "-01"); data.info = "Officially released · " + monthNames[date.getMonth()] + " " + date.getFullYear(); } archives.push(data); } } archives = archives.sort((a, b) => a.date - b.date).reverse() %> <% for (let archive of archives) { %>
">

<%- archive.name %>

<%- archive.description %>

Download

<%- archive.info %>

<% } %>
<%- include(`${private}/footer.ejs`) %>