Skip to content

Commit

Permalink
fix: fix round issue in git commit list diff calculation (#1637)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Nov 8, 2023
1 parent 6ed57fc commit 3a651c9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default class GitCommitsListDayCommit extends Mixins(BaseMixin) {
commitDay.setHours(0, 0, 0, 0)
const todayDay = new Date()
todayDay.setHours(0, 0, 0, 0)
const diff = Math.floor(todayDay.getTime() - commitDay.getTime()) / (1000 * 60 * 60 * 24)
const diff = Math.floor((todayDay.getTime() - commitDay.getTime()) / (1000 * 60 * 60 * 24))
if (diff === 0) {
const diffHours = Math.floor((new Date().getTime() - this.commit.date * 1000) / (1000 * 60 * 60))
Expand Down

0 comments on commit 3a651c9

Please sign in to comment.