Fix Utils.minutesBetween()
minutesBetween( new Date(2019, 01, 01, 13, 20, 00), new Date(2019, 01, 01, 14, 20, 00) ) returned 0 instead of 60, the fixed function property return numbers of minutes after 60.
This commit is contained in:
@@ -125,7 +125,7 @@ function thumbnailParametersFor(width, height) {
|
||||
|
||||
|
||||
function minutesBetween(date1, date2) {
|
||||
return Math.round((((date2 - date1) % 86400000) % 3600000) / 60000)
|
||||
return ((date2 - date1) / 1000) / 60
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user