diff --git a/ui/src/components/calendar/EventItem.vue b/ui/src/components/calendar/EventItem.vue index a33e9b8..8c7537b 100644 --- a/ui/src/components/calendar/EventItem.vue +++ b/ui/src/components/calendar/EventItem.vue @@ -42,9 +42,9 @@ export default class EventItem extends Vue { private readonly event!: Event; private get data_string(): string { - const locale_string = this.event.start - .setLocale(navigator.language) - .toLocaleString(DateTime.DATETIME_MED); + const locale_string = this.event.start.toLocaleString( + DateTime.DATETIME_MED_WITH_WEEKDAY + ); // TODO: if applicable, include days and/or minutes. const duration_string = this.event.duration.shiftTo("hours").toHuman(); diff --git a/ui/src/components/calendar/event.ts b/ui/src/components/calendar/event.ts index be016cf..f2536c1 100644 --- a/ui/src/components/calendar/event.ts +++ b/ui/src/components/calendar/event.ts @@ -9,8 +9,12 @@ export default class Event { public constructor(json_data: Record) { this.summary = json_data["summary"]; this.description = json_data["description"]; - this.start = DateTime.fromISO(json_data["dtstart"]); - const end = DateTime.fromISO(json_data["dtend"]); + this.start = DateTime + .fromISO(json_data["dtstart"]) + .setLocale(navigator.language); + const end = DateTime + .fromISO(json_data["dtend"]) + .setLocale(navigator.language); this.duration = end.diff(this.start); }