From b61bb805e80b15259e007b5b742ca8e03be04a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Wed, 11 Mar 2020 17:54:13 +0100 Subject: [PATCH] Place: Fix modified_on date format to pass into functions --- src/routes/location/[country]/[place].svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/routes/location/[country]/[place].svelte b/src/routes/location/[country]/[place].svelte index c29dfdd..9227365 100644 --- a/src/routes/location/[country]/[place].svelte +++ b/src/routes/location/[country]/[place].svelte @@ -56,9 +56,10 @@ // Define dates $: latestPhoto = photos[0] - $: dateUpdatedFull = latestPhoto ? formatDate(latestPhoto.modified_on, 'FULL') : '' - $: dateUpdatedDatetime = latestPhoto ? formatDate(latestPhoto.modified_on, 'DATETIME') : '' - $: dateUpdatedRelative = latestPhoto ? relativeTime(latestPhoto.modified_on, 2592000000) : '' + $: latestPhotoModified = latestPhoto.modified_on.replace(' ', 'T') + $: dateUpdatedFull = latestPhoto ? formatDate(latestPhotoModified, 'FULL') : '' + $: dateUpdatedDatetime = latestPhoto ? formatDate(latestPhotoModified, 'DATETIME') : '' + $: dateUpdatedRelative = latestPhoto ? relativeTime(latestPhotoModified, 2592000000) : '' /*