Skip to content

Commit

Permalink
Merge pull request #5216 from brave/monthly-prior
Browse files Browse the repository at this point in the history
Removes monthly report for versions before 1.3
  • Loading branch information
NejcZdovc authored Apr 10, 2020
2 parents 142b3eb + 35c411b commit 7f5f450
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,15 @@ class PageWallet extends React.Component<Props, State> {
return
}

const date = new Date(Date.UTC(parseInt(items[0], 10), parseInt(items[1], 10) - 1, 10))
const year = parseInt(items[0], 10)
const month = parseInt(items[1], 10) - 1

// we only want to show reports from version 1.3 (Feb 2020) up
if (year < 2020 || (year === 2020 && month === 0)) {
return
}

const date = new Date(Date.UTC(year, month, 10))
result[id] = new Intl.DateTimeFormat('default', { month: 'long', year: 'numeric' }).format(date)
})

Expand Down

0 comments on commit 7f5f450

Please sign in to comment.