Merge pull request #494 from aurimasv/csljson-date

Fix CSL-JSON date import
This commit is contained in:
Dan Stillman 2014-06-02 18:31:23 -04:00
commit 90d57c4afe

View file

@ -1622,11 +1622,10 @@ Zotero.Utilities = {
if(Zotero.ItemFields.isValidForType(fieldID, itemTypeID)) { if(Zotero.ItemFields.isValidForType(fieldID, itemTypeID)) {
var date = ""; var date = "";
if(cslDate.literal) { if(cslDate.literal || cslDate.raw) {
date = cslDate.literal || cslDate.raw;
if(variable === "accessed") { if(variable === "accessed") {
date = strToISO(cslDate.literal); date = Zotero.Date.strToISO(date);
} else {
date = cslDate.literal;
} }
} else { } else {
var newDate = Zotero.Utilities.deepCopy(cslDate); var newDate = Zotero.Utilities.deepCopy(cslDate);