strToDate(): Fix 'order' for just a number <=12

"m" instead of "m y"
This commit is contained in:
Dan Stillman 2020-05-28 04:32:14 -04:00
parent 70b361ed8b
commit 85bc5d168e
2 changed files with 5 additions and 1 deletions

View file

@ -207,6 +207,7 @@ describe("Zotero.Date", function() {
var o = Zotero.Date.strToDate('1');
assert.equal(o.month, 0);
assert.isUndefined(o.year);
assert.equal(o.order, 'm');
});
it("should parse string with just day number", function () {
@ -214,6 +215,7 @@ describe("Zotero.Date", function() {
assert.equal(o.day, 25);
assert.isUndefined(o.month);
assert.isUndefined(o.year);
assert.equal(o.order, 'd');
});
it("should work in translator sandbox", function* () {