Skip to content

Commit 7ab525a

Browse files
committed
Round number of weeks down.
1 parent 31c9004 commit 7ab525a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/datetime-range.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ angular.module('g1b.datetime-range', []).
3737
// Get number of weeks in month
3838
scope.getNumWeeks = function () {
3939
if ( !scope.calendar ) { return; }
40-
return (scope.calendar.clone().endOf('month').endOf('week').diff(scope.calendar.clone().startOf('month').startOf('week'), 'days') / 7) + 1;
40+
return Math.floor(scope.calendar.clone().endOf('month').endOf('week').diff(scope.calendar.clone().startOf('month').startOf('week'), 'days') / 7) + 1;
4141
}
4242

4343
// Set selected date

0 commit comments

Comments
 (0)