make sure getDaysInMonth doesn't fail if DST changes between months
This commit is contained in:
parent
4afdb71581
commit
f01456e475
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,8 @@ Ox.getDaysInMonth = function(year, month) {
|
|||
: Ox.indexOf(Ox.MONTHS, function(v) {
|
||||
return v.slice(0, 3) == month.slice(0, 3);
|
||||
}) + 1;
|
||||
return new Date(year, month, 0).getDate();
|
||||
// Set to 1 AM since we may hit a DST change
|
||||
return new Date(year, month, 0, 1).getDate();
|
||||
}
|
||||
|
||||
/*@
|
||||
|
|
Loading…
Reference in a new issue