Merge lp:~doflah/ubuntu-calendar-app/fix_daylight_savings into lp:ubuntu-calendar-app
Proposed by
Dennis O'Flaherty
Status: | Merged |
---|---|
Approved by: | Olivier Tilloy |
Approved revision: | 99 |
Merged at revision: | 102 |
Proposed branch: | lp:~doflah/ubuntu-calendar-app/fix_daylight_savings |
Merge into: | lp:ubuntu-calendar-app |
Diff against target: |
11 lines (+1/-1) 1 file modified
dateExt.js (+1/-1) |
To merge this branch: | bzr merge lp:~doflah/ubuntu-calendar-app/fix_daylight_savings |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Olivier Tilloy (community) | Approve | ||
Review via email: mp+183557@code.launchpad.net |
Commit message
Fix the implementation of Date.addDays() wrt DST.
Description of the change
The current implementation of Date#addDays breaks in daylight savings time.
var d = new Date(2013, 9, 27);
d.addDays(
d.addDays(
so November has two 3rds. This is too many. Using setDate and getDate results in the expected behavior.
var d = new Date(2013, 9, 27);
d.addDays(
d.addDays(
To post a comment you must log in.
Good catch Dennis, thanks for the patch!