mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
duration function more compact
This commit is contained in:
parent
bb91b8a269
commit
1b6f91ea48
@ -74,10 +74,11 @@ export default {
|
||||
: ''
|
||||
},
|
||||
duration() {
|
||||
const startDate = this.$moment.unix(new Date(this.decay.decay_start))
|
||||
const endDate = this.$moment.unix(new Date(this.decay.decay_end))
|
||||
const diff = this.$moment.duration(endDate.diff(startDate))
|
||||
return diff._data
|
||||
return this.$moment.duration(
|
||||
this.$moment
|
||||
.unix(new Date(this.decay.decay_end))
|
||||
.diff(this.$moment.unix(new Date(this.decay.decay_start))),
|
||||
)._data
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user