We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d5e0a9 commit 96db8e5Copy full SHA for 96db8e5
1 file changed
src/mixins/relativeDate.js
@@ -3,17 +3,13 @@
3
* SPDX-License-Identifier: AGPL-3.0-or-later
4
*/
5
6
-import moment from '@nextcloud/moment'
+import { useFormatRelativeTime } from '@nextcloud/vue'
7
8
export default {
9
computed: {
10
relativeDate() {
11
return (timestamp) => {
12
- const diff = moment(this.$root.time).diff(moment(timestamp))
13
- if (diff >= 0 && diff < 45000) {
14
- return t('core', 'seconds ago')
15
- }
16
- return moment(timestamp).fromNow()
+ return useFormatRelativeTime(timestamp)
17
}
18
},
19
0 commit comments