Fix season export in CSL JSON

This commit is contained in:
Aurimas Vinckevicius 2015-08-04 14:19:39 -05:00
parent 0fbae77456
commit bb15336fdb
3 changed files with 5 additions and 4 deletions

View file

@ -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'];

View file

@ -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 {

View file

@ -1347,8 +1347,7 @@
1,
2
]
],
"season": "2000-01-02"
]
},
"title": "Title",
"type": "patent"