Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-05-02 12:03:22 +0300
committerdartcafe <github@dartcafe.de>2020-05-02 12:03:22 +0300
commita40532aa08fb65afdcdd27d019068fe20d2f508d (patch)
treec3b97a63ad30b57538093eb235b399fea08f760e /src/js/components/Comments/Comments.vue
parent4455f8780be84e4a20b5edde495a5783e5bfc9b6 (diff)
use @nextcloud/moment
Diffstat (limited to 'src/js/components/Comments/Comments.vue')
-rw-r--r--src/js/components/Comments/Comments.vue6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/js/components/Comments/Comments.vue b/src/js/components/Comments/Comments.vue
index c49db8bd..30d35654 100644
--- a/src/js/components/Comments/Comments.vue
+++ b/src/js/components/Comments/Comments.vue
@@ -35,7 +35,7 @@
</ActionButton>
</Actions>
<div class="date">
- {{ moment.utc(comment.dt).fromNow() }}
+ {{ dateCommentedRelative(comment.dt) }}
</div>
</div>
@@ -55,6 +55,7 @@
<script>
import CommentAdd from './CommentAdd'
import sortBy from 'lodash/sortBy'
+import moment from '@nextcloud/moment'
import { Actions, ActionButton } from '@nextcloud/vue'
import { mapState, mapGetters } from 'vuex'
@@ -102,6 +103,9 @@ export default {
console.error(error.response)
})
},
+ dateCommentedRelative(date) {
+ return moment.utc(date).fromNow()
+ },
},
}
</script>