Skip to content

Commit

Permalink
Small fix;
Browse files Browse the repository at this point in the history
  • Loading branch information
r.cristian committed Aug 27, 2016
1 parent 2dab058 commit 41960cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Peg/Bundles/WebBundle/Resources/public/js/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
var diffDays = Math.round(Math.abs((firstDate.getTime() - secondDate.getTime()) / (oneDay)));
if (diffDays < 30) {
var timeString = diffDays > 1 ? ' days' : ' day';
return diffDays;
return diffDays + timeString;
}

var diffMonths = Math.round(Math.abs((firstDate.getTime() - secondDate.getTime()) / (oneMonth)));
;
var timeString = diffHours > 1 ? ' months' : ' month';
var timeString = diffMonths > 1 ? ' months' : ' month';
return diffMonths + timeString;

}
Expand Down

0 comments on commit 41960cd

Please sign in to comment.