diff --git a/package.json b/package.json
index 82d86b82..6196f96b 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"bulma": "^0.8.0",
"copy-to-clipboard": "^3.2.0",
"lodash": "^4.17.15",
+ "moment": "^2.24.0",
"register-service-worker": "^1.6.2",
"v-tooltip": "^2.0.2",
"verte": "^0.0.12",
diff --git a/src/components/tasks/ShowListTasks.vue b/src/components/tasks/ShowListTasks.vue
index 81e3ec28..c689c476 100644
--- a/src/components/tasks/ShowListTasks.vue
+++ b/src/components/tasks/ShowListTasks.vue
@@ -46,7 +46,7 @@
{{ label.title }}
- - Due on {{new Date(l.dueDate).toLocaleString()}}
+ - Due {{formatDateSince(l.dueDate)}}
diff --git a/src/components/tasks/ShowTasks.vue b/src/components/tasks/ShowTasks.vue
index d6b452d8..05d655c0 100644
--- a/src/components/tasks/ShowTasks.vue
+++ b/src/components/tasks/ShowTasks.vue
@@ -21,7 +21,7 @@
{{l.text}}
- - Due on {{formatUnixDate(l.dueDate)}}
+ - Due {{formatDateSince(l.dueDate)}}
@@ -84,9 +84,6 @@
message.error(e, this)
})
},
- formatUnixDate(dateUnix) {
- return (new Date(dateUnix * 1000)).toLocaleString()
- },
gotoList(lid) {
router.push({name: 'showList', params: {id: lid}})
},
diff --git a/src/components/tasks/reusable/attachments.vue b/src/components/tasks/reusable/attachments.vue
index 258e000c..380323f7 100644
--- a/src/components/tasks/reusable/attachments.vue
+++ b/src/components/tasks/reusable/attachments.vue
@@ -31,8 +31,7 @@
{{ a.file.getHumanSize() }} |
{{ a.file.mime }} |
-
- {{ new Date(a.created) }} |
+ {{ formatDateSince(a.created) }} |
|