Accounting for date precision in scene and movie pages and tiles.

This commit is contained in:
2024-08-19 23:31:28 +02:00
parent 0cc9ee51e2
commit 1ea8e52ab1
6 changed files with 27 additions and 5 deletions

View File

@@ -65,7 +65,11 @@
:datetime="movie.effectiveDate.toISOString()"
class="date"
:class="{ nodate: !movie.date }"
>{{ format(movie.effectiveDate, movie.effectiveDate.getFullYear() === currentYear ? 'MMM d' : 'MMM d, y') }}</time>
>{{ 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]) }}</time>
</div>
<a