diff --git a/src/components/announcement/announcement.js b/src/components/announcement/announcement.js index 20f8c62f..993e3655 100644 --- a/src/components/announcement/announcement.js +++ b/src/components/announcement/announcement.js @@ -33,6 +33,14 @@ const Announcement = { isRead () { return this.announcement.read }, + publishedAt () { + const time = this.announcement['published_at'] + if (!time) { + return + } + + return this.formatTimeOrDate(time, localeService.internalToBrowserLocale(this.$i18n.locale)) + }, startsAt () { const time = this.announcement['starts_at'] if (!time) { diff --git a/src/components/announcement/announcement.vue b/src/components/announcement/announcement.vue index 72d99d85..823e496c 100644 --- a/src/components/announcement/announcement.vue +++ b/src/components/announcement/announcement.vue @@ -20,6 +20,9 @@ v-if="!editing" class="times" > + + {{ $t('announcements.published_time_display', { time: publishedAt }) }} + {{ $t('announcements.start_time_display', { time: startsAt }) }}