For some reason we're using Zotero.Date.formatDate(), but I believe we use strToISO() in most site translators these days. Any reason not to change this?
var item = new Zotero.Item()
Zotero.Utilities.Item.itemFromCSLJSON(
item,
{
type: 'article',
"issued": {
"date-parts": [[ 2000, 3, 15 ]]
}
}
)
item
{
"key": null,
"version": null,
"itemType": "preprint",
"date": "March 15, 2000",
"creators": [],
"tags": [],
"collections": [],
"relations": {}
}
This resulted in a Chinese month being set ("四月 26, 2010") from ACM based on the browser locale:
https://forums.zotero.org/discussion/97683/bug-locale-issues-concerning-zotero-and-zotero-connector
(There was a separate parsing bug there that's been fixed.)
For some reason we're using
Zotero.Date.formatDate(), but I believe we usestrToISO()in most site translators these days. Any reason not to change this?{ "key": null, "version": null, "itemType": "preprint", "date": "March 15, 2000", "creators": [], "tags": [], "collections": [], "relations": {} }This resulted in a Chinese month being set ("四月 26, 2010") from ACM based on the browser locale:
https://forums.zotero.org/discussion/97683/bug-locale-issues-concerning-zotero-and-zotero-connector
(There was a separate parsing bug there that's been fixed.)