Fix parsing of January dates in Zotero.Date.strToISO()

https://forums.zotero.org/discussion/36550/#Item_6
This commit is contained in:
Dan Stillman 2014-05-06 14:49:10 -04:00
parent 6a58d3b2ff
commit 42c02526ef

View file

@ -533,7 +533,7 @@ Zotero.Date = new function(){
if(date.year) {
var dateString = Zotero.Utilities.lpad(date.year, "0", 4);
if(date.month) {
if (parseInt(date.month) == date.month) {
dateString += "-"+Zotero.Utilities.lpad(date.month+1, "0", 2);
if(date.day) {
dateString += "-"+Zotero.Utilities.lpad(date.day, "0", 2);