www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit bb15336fdb23ec3441ec9cceb8ff9ab0a7019acc
parent 0fbae77456a74ff5b4503b863a36fe231f43ba15
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date:   Tue,  4 Aug 2015 14:19:39 -0500

Fix season export in CSL JSON

Diffstat:
Mchrome/content/zotero/xpcom/date.js | 4+++-
Mchrome/content/zotero/xpcom/utilities.js | 2+-
Mtest/tests/data/citeProcJSExport.js | 3+--
3 files changed, 5 insertions(+), 4 deletions(-)

diff --git 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 @@ -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 @@ -1347,8 +1347,7 @@ 1, 2 ] - ], - "season": "2000-01-02" + ] }, "title": "Title", "type": "patent"