Fix daily average on accounts younger than a day
This commit is contained in:
parent
7ee87c7618
commit
66b59f2752
1 changed files with 2 additions and 3 deletions
|
@ -79,9 +79,8 @@
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
dailyAvg () {
|
dailyAvg () {
|
||||||
return Math.round(
|
const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))
|
||||||
this.user.statuses_count / ((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))
|
return Math.round(this.user.statuses_count / days)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in a new issue