Use ISO 8601 accessDates everywhere

This uses ISO 8601 dates for generateAllTypesAndFieldsData (and
changes populateDBWithSampleData to use Item#fromJSON), and makes
translators expect ISO 8601 accessDates, although SQL accessDates are
still supported with a deprecation warning. Canonicalization happens in
Zotero.Translate, so I need to remember to update connectors as well.
This commit is contained in:
Simon Kornblith 2015-06-07 18:38:00 -04:00
parent 8448203583
commit 70f021f945
7 changed files with 78 additions and 63 deletions

View file

@ -41,7 +41,9 @@ describe("Support Functions for Unit Testing", function() {
if (skipFields.indexOf(prop) != -1) continue;
// Using base-mapped fields
assert.equal(item[prop], zItem.getField(prop, false, true), 'inserted item property has the same value as sample data');
let field = zItem.getField(prop, false, true);
if (prop === "accessDate") field = Zotero.Date.sqlToISO8601(field);
assert.equal(field, item[prop], 'inserted item property has the same value as sample data');
}
if (item.creators) {