diff --git a/components/movies/tile.vue b/components/movies/tile.vue index 7d61a83..06135f1 100644 --- a/components/movies/tile.vue +++ b/components/movies/tile.vue @@ -66,10 +66,9 @@ class="date" :class="{ nodate: !movie.date }" >{{ format(movie.effectiveDate, { - day: movie.effectiveDate.getFullYear() === currentYear ? 'MMM d' : 'MMM d, y', month: movie.effectiveDate.getFullYear() === currentYear ? 'MMM' : 'MMM y', year: 'y', - }[movie.datePrecision]) }} + }[movie.datePrecision] || (movie.effectiveDate.getFullYear() === currentYear ? 'MMM d' : 'MMM d, y')) }} {{ format(scene.effectiveDate, { - day: 'MMM d, y', month: 'MMM y', year: 'y', - }[scene.datePrecision]) }} + }[scene.datePrecision] || 'MMM d, y') }} diff --git a/pages/movies/@movieId/+Page.vue b/pages/movies/@movieId/+Page.vue index d2a2685..a19d519 100644 --- a/pages/movies/@movieId/+Page.vue +++ b/pages/movies/@movieId/+Page.vue @@ -91,10 +91,9 @@ :datetime="movie.effectiveDate.toISOString()" class="date ellipsis" >{{ formatDate(movie.effectiveDate, { - day: 'MMMM d, y', month: 'MMMM y', year: 'y', - }[movie.datePrecision]) }} + }[movie.datePrecision] || 'MMMM d, y') }}
diff --git a/pages/scene/+Page.vue b/pages/scene/+Page.vue index cab84d2..01d1670 100644 --- a/pages/scene/+Page.vue +++ b/pages/scene/+Page.vue @@ -110,10 +110,9 @@ :datetime="scene.effectiveDate.toISOString()" class="ellipsis compact-hide" >{{ formatDate(scene.effectiveDate, { - day: 'MMMM d, y', month: 'MMMM y', year: 'y', - }[scene.datePrecision]) }} + }[scene.datePrecision] || 'MMMM d, y') }}