commit 42c02526efb22fa52401ddb7808278d757ff6d29
parent 6a58d3b2ffc81020568db7c8994bbe64f90f1a8d
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 6 May 2014 14:49:10 -0400
Fix parsing of January dates in Zotero.Date.strToISO()
https://forums.zotero.org/discussion/36550/#Item_6
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js
@@ -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);