diff --git a/components/SermonCard.vue b/components/SermonCard.vue index 30e586c..8283f07 100644 --- a/components/SermonCard.vue +++ b/components/SermonCard.vue @@ -34,7 +34,8 @@ defineProps<{ }>() function formatDate(dateString: string) { - const date = new Date(dateString) + // Add T00:00:00 to ensure the date is interpreted as local time, not UTC + const date = new Date(dateString + 'T00:00:00') return date.toLocaleDateString('en-US', { year: 'numeric', month: 'long', diff --git a/pages/index.vue b/pages/index.vue index 14f68b6..22e9243 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -155,7 +155,8 @@ const hasCurrentSermons = computed(() => { }) function formatDate(dateString: string) { - const date = new Date(dateString) + // Add T00:00:00 to ensure the date is interpreted as local time, not UTC + const date = new Date(dateString + 'T00:00:00') return date.toLocaleDateString('en-US', { year: 'numeric', month: '2-digit',