fix: ics timing
This commit is contained in:
parent
a26e34f2ef
commit
49d91bb581
3 changed files with 10 additions and 14 deletions
|
@ -171,21 +171,17 @@ export const albumReleasesCalendar = (collection) => {
|
|||
const events = albumReleases.map(album => {
|
||||
const date = DateTime.fromFormat(album.date, 'MMMM d, yyyy')
|
||||
if (!date.isValid) return null
|
||||
|
||||
return {
|
||||
start: [
|
||||
date.year,
|
||||
date.month,
|
||||
date.day
|
||||
],
|
||||
start: [date.year, date.month, date.day],
|
||||
startInputType: 'local',
|
||||
startOutputType: 'local',
|
||||
duration: { days: 1 },
|
||||
title: `Release: ${album.artist} / ${album.title}`,
|
||||
title: `Release: ${album.artist} - ${album.title}`,
|
||||
description: `Check out this new album release: ${album.url}`,
|
||||
url: album.url,
|
||||
uid: `${date.toFormat('yyyyMMdd')}-${album.artist}-${album.title}@coryd.dev`,
|
||||
timestamp: DateTime.now().toUTC().toFormat('yyyyMMdd\'T\'HHmmss\'Z\'') // Correctly format DTSTAMP
|
||||
}
|
||||
timestamp: DateTime.now().toUTC().toFormat("yyyyMMdd'T'HHmmss'Z'")
|
||||
};
|
||||
}).filter(event => event !== null)
|
||||
|
||||
const { error, value } = ics.createEvents(events)
|
||||
|
@ -197,5 +193,5 @@ export const albumReleasesCalendar = (collection) => {
|
|||
return ''
|
||||
}
|
||||
|
||||
return value;
|
||||
return value
|
||||
}
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "coryd.dev",
|
||||
"version": "21.5.2",
|
||||
"version": "21.5.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "coryd.dev",
|
||||
"version": "21.5.2",
|
||||
"version": "21.5.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@cdransf/api-text": "^1.4.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "coryd.dev",
|
||||
"version": "21.5.2",
|
||||
"version": "21.5.3",
|
||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
|
Reference in a new issue