Format date and time for international locales
Uninstalls vue-date-fns and uses toLocaleDateString() method to
return formatted date and time.
Date language is set by i18n and time/timezone is formatted by
browser locale.
Uses vue filter to format date and time as:
- short month, day, year, time and timezone
- 'en' example: Feb 23, 2020, 3:40:25 PM CST
- 'es' example: 25 feb 2020 14:23:36 GMT-6
- hour12 value is determined by browser default
Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: I4fe8c51f5437cef263f1e0ea4184c0b552c85f4d
diff --git a/src/views/Overview/OverviewEvents.vue b/src/views/Overview/OverviewEvents.vue
index 2004aa5..af86e79 100644
--- a/src/views/Overview/OverviewEvents.vue
+++ b/src/views/Overview/OverviewEvents.vue
@@ -18,8 +18,10 @@
:fields="fields"
>
<template v-slot:cell(timestamp)="data">
- {{ data.value | date('hh:MM:SS A') }} <br />
- {{ data.value | date('dddd, MMM DD, YYYY') }}
+ <div class="date-column">
+ {{ data.value | formatDate }} <br />
+ {{ data.value | formatTime }}
+ </div>
</template>
</b-table>
</div>
@@ -71,4 +73,8 @@
.btn {
@include float-right;
}
+
+.date-column {
+ min-width: 200px;
+}
</style>