diff --git a/src/assets/i18n/de-DE.json b/src/assets/i18n/de-DE.json index 1b5e016..42c0081 100644 --- a/src/assets/i18n/de-DE.json +++ b/src/assets/i18n/de-DE.json @@ -14,7 +14,7 @@ "in": "in {time}", "remaining": "{time} übrig", "until": "Bis {time}", - "left": "{time} verbleibend", + "left": "Noch {time}", "d": "{n}Tg | {n}Tg", "h": "{n}Std | {n}Std", "m": "{n}Min | {n}Min", diff --git a/src/common/i18n.mjs b/src/common/i18n.mjs index d16a264..225ab2b 100644 --- a/src/common/i18n.mjs +++ b/src/common/i18n.mjs @@ -50,6 +50,7 @@ export const regionalLocales = { export const defaultLocale = locales.find(l => l.code === 'en-US'); const datetimeFormats = { + weekday: { weekday: 'short' }, dateTimeShort: { month: 'numeric', day: 'numeric', hour: 'numeric', minute: '2-digit' }, dateTimeShortWeekday: { month: 'numeric', weekday: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' }, time: { hour: 'numeric', minute: '2-digit' }, diff --git a/src/common/time.js b/src/common/time.js index d1fb83c..6784486 100644 --- a/src/common/time.js +++ b/src/common/time.js @@ -1,6 +1,17 @@ import { useI18n } from 'vue-i18n'; import { useTimeStore } from '@/stores/time'; +export function formatHistoricalDateRange(startTime, endTime, locale) { + const formatter = new Intl.DateTimeFormat(locale, { + weekday: 'short', + month: 'short', + day: 'numeric', + year: 'numeric', + }); + + return formatter.formatRange(new Date(startTime), new Date(endTime)); +} + export function getDurationParts(value) { let negative = (value < 0) ? '-' : ''; value = Math.abs(value); diff --git a/src/components/ScheduleRow.vue b/src/components/ScheduleRow.vue index 18a9f25..ded6803 100644 --- a/src/components/ScheduleRow.vue +++ b/src/components/ScheduleRow.vue @@ -14,6 +14,9 @@
+ {{ $d(props.schedule.startTime, 'time') }} – {{ $d(props.schedule.endTime, 'time') }} @@ -46,6 +49,9 @@
+ {{ $d(props.schedule.startTime, 'time') }} – {{ $d(props.schedule.endTime, 'time') }} @@ -84,6 +90,7 @@ diff --git a/src/components/SplatfestBox.vue b/src/components/SplatfestBox.vue index 4f6b5ad..835e000 100644 --- a/src/components/SplatfestBox.vue +++ b/src/components/SplatfestBox.vue @@ -45,6 +45,9 @@
+ @@ -78,7 +76,7 @@ diff --git a/src/layouts/ScreenshotLayout.vue b/src/layouts/ScreenshotLayout.vue index 186e6d2..f3ea35f 100644 --- a/src/layouts/ScreenshotLayout.vue +++ b/src/layouts/ScreenshotLayout.vue @@ -6,41 +6,41 @@
-
+
-
-
+
+
{{ props.header }}
@splatoon3.ink
- -
- +
+
+ {{ timestamps[0] }} +
+
+
+ {{ timestamp }} +
+
+
-
+