commit 85c5c614ea3da2d2be034f3ef91ad140a9bf93cb parent ba89dbf0ae0617a14c269bf6f831f47653cfb566 Author: Aurimas Vinckevicius <aurimas.dev@gmail.com> Date: Mon, 2 Jun 2014 17:25:16 -0500 Fix CSL-JSON date import Diffstat:
| M | chrome/content/zotero/xpcom/utilities.js | | | 7 | +++---- |
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -1622,11 +1622,10 @@ Zotero.Utilities = { if(Zotero.ItemFields.isValidForType(fieldID, itemTypeID)) { var date = ""; - if(cslDate.literal) { + if(cslDate.literal || cslDate.raw) { + date = cslDate.literal || cslDate.raw; if(variable === "accessed") { - date = strToISO(cslDate.literal); - } else { - date = cslDate.literal; + date = Zotero.Date.strToISO(date); } } else { var newDate = Zotero.Utilities.deepCopy(cslDate);