Skip to content

Commit

Permalink
Merge pull request #183 from bubbatls/patch-2
Browse files Browse the repository at this point in the history
Make it work with date before 1970
  • Loading branch information
arolson101 authored Feb 7, 2018
2 parents d89bb5a + e885e39 commit 5335e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rrule.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
var date1_ms = date1.getTime() - dateutil.tzOffset(date1)
var date2_ms = date2.getTime() - dateutil.tzOffset(date2)
// Calculate the difference in milliseconds
var difference_ms = Math.abs(date1_ms - date2_ms)
var difference_ms = date1_ms - date2_ms
// Convert back to days and return
return Math.round(difference_ms / dateutil.ONE_DAY)
},
Expand Down

0 comments on commit 5335e67

Please sign in to comment.