diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js index c41b5eec5..d34c326a3 100644 --- a/chrome/content/zotero/xpcom/date.js +++ b/chrome/content/zotero/xpcom/date.js @@ -330,6 +330,8 @@ Zotero.Date = new function(){ } if(date.month) date.month--; // subtract one for JS style + else delete date.month; + Zotero.debug("DATE: retrieved with algorithms: "+JSON.stringify(date)); parts.push( @@ -369,7 +371,7 @@ Zotero.Date = new function(){ } // MONTH - if(!date.month) { + if(date.month === undefined) { // compile month regular expression var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index ef161a193..e24ece3a4 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1611,7 +1611,7 @@ Zotero.Utilities = { cslItem[variable] = {"date-parts":[dateParts]}; // if no month, use season as month - if(dateObj.part && !dateObj.month) { + if(dateObj.part && dateObj.month === undefined) { cslItem[variable].season = dateObj.part; } } else { diff --git a/test/tests/data/citeProcJSExport.js b/test/tests/data/citeProcJSExport.js index 3678e9909..67cb3f87f 100644 --- a/test/tests/data/citeProcJSExport.js +++ b/test/tests/data/citeProcJSExport.js @@ -1347,8 +1347,7 @@ 1, 2 ] - ], - "season": "2000-01-02" + ] }, "title": "Title", "type": "patent"