fix: album release sorting
This commit is contained in:
parent
7602459198
commit
77992e259d
2 changed files with 12 additions and 10 deletions
|
@ -10,5 +10,6 @@ module.exports = async function () {
|
|||
const icsRes = await fetch(URL)
|
||||
const icsData = await icsRes.text()
|
||||
const data = icsToJson(icsData)
|
||||
return data.filter((d) => DateTime.fromISO(d.startDate) > DateTime.now())
|
||||
const albumReleases = data.filter((d) => DateTime.fromISO(d.startDate) > DateTime.now())
|
||||
return albumReleases.sort((a, b) => new Date(a.startDate) - new Date(b.startDate))
|
||||
}
|
||||
|
|
Reference in a new issue