Update date filter to use international date format ISO
ISO 8601 format is the standard for international date formats.
- Formats date as: YYYY-MM-DD, example 2020-06-05
https://www.w3.org/QA/Tips/iso-date
Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: Ic0796932b441592e998eaa8818b4f88fe8f1345d
diff --git a/src/main.js b/src/main.js
index d9f1e78..9e0502d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -34,13 +34,8 @@
// Filters
Vue.filter('formatDate', function(value) {
- const dateOptions = {
- year: 'numeric',
- month: 'short',
- day: 'numeric'
- };
if (value instanceof Date) {
- return value.toLocaleDateString(i18n.locale, dateOptions);
+ return value.toISOString().substring(0, 10);
}
});