Skip to content

Commit

Permalink
➕ merge pull request #94 from devmount/fix-zero-start
Browse files Browse the repository at this point in the history
🔨 exclude zero dates for date range calculation
  • Loading branch information
devmount authored Oct 26, 2020
2 parents 10e809b + 9c9449a commit 66c0998
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Stats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ export default {
this.numbers.received++
type = 'received'
}
if (m.date.getTime() < this.numbers.start.getTime()) this.numbers.start = m.date
// calculate starting date (= date of oldest email)
if (m.date && m.date.getTime() > 0 && m.date.getTime() < this.numbers.start.getTime()) {
this.numbers.start = m.date
}
// years
let y = m.date.getFullYear()
if (!(y in this.yearsData[type])) {
Expand Down

0 comments on commit 66c0998

Please sign in to comment.