diff --git a/package-lock.json b/package-lock.json index db3274ce..3739b017 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "16.0.2", + "version": "16.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "16.0.2", + "version": "16.0.3", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.2.2", diff --git a/package.json b/package.json index ac91d33a..881d6df5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "16.0.2", + "version": "16.0.3", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": { diff --git a/src/_data/weeklyArtistChart.js b/src/_data/weeklyArtistChart.js index 92991dd6..027da5f0 100644 --- a/src/_data/weeklyArtistChart.js +++ b/src/_data/weeklyArtistChart.js @@ -36,13 +36,12 @@ const formatData = (data) => { export default async function() { try { - const now = DateTime.now() - const startOfWeek = now.minus({ days: now.weekday + 1 }).startOf('day') - const endOfWeek = now.minus({ days: now.weekday - 7 }).endOf('day') - const startOfWeekSeconds = startOfWeek.toSeconds() - const endOfWeekSeconds = endOfWeek.toSeconds() - const weekNumber = now.toFormat('kkkk-WW') - + const now = DateTime.now(); + const startOfWeek = now.minus({ days: now.weekday % 7 }).startOf('day'); + const endOfWeek = startOfWeek.plus({ days: 6 }).endOf('day'); + const startOfWeekSeconds = startOfWeek.toSeconds(); + const endOfWeekSeconds = endOfWeek.toSeconds(); + const weekNumber = now.toFormat('kkkk-WW'); let { data: recentCharts } = await supabase .from('weekly_charts') .select('*') @@ -54,7 +53,7 @@ export default async function() { return { title: formattedData['content'], description: formattedData['description'], - url: `https://coryd.dev/now?ts=${chart['week']}#artists`, + url: `https://coryd.dev/music?ts=${chart['week']}`, date: chart['date'] } }) @@ -65,7 +64,7 @@ export default async function() { return { title: formattedData['content'], description: formattedData['description'], - url: `https://coryd.dev/now?ts=${chart['week']}#artists`, + url: `https://coryd.dev/music?ts=${chart['week']}`, date: chart['date'] } })