assets/js/romo/date.js in romo-0.19.10 vs assets/js/romo/date.js in romo-0.20.0
- old
+ new
@@ -159,11 +159,11 @@
var dateValues = this._parseValues(this.dateString);
if (dateValues.length === 0) {
return undefined;
}
- var year = parseInt(dateValues[0]);
+ var year = parseInt(dateValues[0], 10);
if (year < 0) {
return undefined;
}
if (dateValues[0].length > 2 && year < 100) {
return undefined;
@@ -174,15 +174,15 @@
if ((year - cy) > 10) { // they are past years except assuming all years
year = year - 100; // in the next decade are future years.
}
}
- var month = parseInt(dateValues[1]) - 1;
+ var month = parseInt(dateValues[1], 10) - 1;
if (month < 0 || month > 11) {
return undefined;
}
- var day = parseInt(dateValues[2]);
+ var day = parseInt(dateValues[2], 10);
var date = RomoDate.for(year, month, day);
if (date.getMonth() !== month) {
return undefined;
}