assets/js/romo/date.js in romo-0.20.7 vs assets/js/romo/date.js in romo-0.20.8

- old
+ new

@@ -76,9 +76,15 @@ daysRemainingInMonth: function(monthDate) { var d = RomoDate.date(monthDate) return RomoDate.daysInMonth(d) - d.getDate() + 1; }, + daysDiff: function(firstDate, secondDate) { + var fd = RomoDate.date(firstDate); + var sd = RomoDate.date(secondDate); + return Math.round((fd.getTime() - sd.getTime()) / 864e5); // 1000 * 60 * 60 * 24 + }, + isoWeekNum: function(weekDate) { var d = RomoDate.date(weekDate) // calc full weeks to nearest Thursday (basis for ISO week numbers) // set to nearest Thursday: current date + 4 - current day number