Permalink
Browse files

Merge pull request #87 from AlphaGit/fix-js-date-parsing

Fixed Firefox parsing of dates.
  • Loading branch information...
2 parents 591b072 + a9ab479 commit aea0917473313bf4357b40288a183848d8024432 @andresmoschini committed May 26, 2012
@@ -51,7 +51,7 @@
})
.reduce(function (intermediateState, days) {
return intermediateState + days
- }, 0)
+ }, 1)
.value();
this.set('VacationsTotalDays', totalDays);
},
@@ -555,7 +555,10 @@
var month = noTimezoneDate.getMonth() + 1;
if (month < 10) month = "0" + month;
- return (date.getFullYear() + "-" + month + "-" + date.getDate());
+ var day = date.getDate().toString();
+ if (day.length == 1) day = "0" + day;
+
+ return (date.getFullYear() + "-" + month + "-" + day);
},
bindUI: function () {
var me = this;

0 comments on commit aea0917

Please sign in to comment.