Merge branch 'fix/daily-avg' into 'develop'
Fix daily average on accounts younger than a day See merge request !69
This commit is contained in:
commit
9ed445fff0
|
@ -79,9 +79,8 @@
|
|||
return this.$store.state.users.currentUser
|
||||
},
|
||||
dailyAvg () {
|
||||
return Math.round(
|
||||
this.user.statuses_count / ((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))
|
||||
)
|
||||
const days = Math.ceil((new Date() - new Date(this.user.created_at)) / (60 * 60 * 24 * 1000))
|
||||
return Math.round(this.user.statuses_count / days)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue