fix js off-by-one in month

This commit is contained in:
Brad Fitzpatrick 2011-05-30 16:48:39 -07:00
parent 96cf953488
commit 5cd6f4b479
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ function dateToRfc3339String(dateVal) {
}
return numStr;
}
return dateVal.getUTCFullYear() + "-" + pad(dateVal.getUTCMonth(), 2) + "-" + pad(dateVal.getUTCDate(), 2) + "T" +
return dateVal.getUTCFullYear() + "-" + pad(dateVal.getUTCMonth() + 1, 2) + "-" + pad(dateVal.getUTCDate(), 2) + "T" +
pad(dateVal.getUTCHours(), 2) + ":" + pad(dateVal.getUTCMinutes(), 2) + ":" + pad(dateVal.getUTCSeconds(), 2) + "Z";
}