Skip to content

Commit

Permalink
Merge pull request #1936 from nextcloud/tintou/nextcloud/moment
Browse files Browse the repository at this point in the history
Replace the deprecated OC.Util.relativeModifiedDate by nextcloud/moment
  • Loading branch information
skjnldsv authored Nov 16, 2020
2 parents 3eefad8 + 4998ef4 commit 16fb97e
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
58 changes: 57 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@nextcloud/dialogs": "^3.1.1",
"@nextcloud/initial-state": "^1.2.0",
"@nextcloud/l10n": "^1.4.1",
"@nextcloud/moment": "^1.1.1",
"@nextcloud/paths": "^1.1.2",
"@nextcloud/router": "^1.2.0",
"@nextcloud/vue": "^3.2.0",
Expand Down
4 changes: 3 additions & 1 deletion src/components/Properties/PropertyRev.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
</template>

<script>
import moment from '@nextcloud/moment'

export default {
name: 'PropertyRev',

Expand All @@ -39,7 +41,7 @@ export default {

computed: {
relativeDate() {
return OC.Util.relativeModifiedDate(this.value.toUnixTime() * 1000)
return moment.unix(this.value.toUnixTime()).fromNow()
},
},
}
Expand Down

0 comments on commit 16fb97e

Please sign in to comment.