Changes date parsing and handling for feeds. Closes #1024, #1025

This commit is contained in:
Adomas Venčkauskas 2016-06-13 13:03:20 +03:00
parent a200f6cfc5
commit 137290b97f
6 changed files with 110 additions and 32 deletions

View file

@ -37,4 +37,13 @@ describe("Zotero.Date", function() {
assert.isFalse(Zotero.Date.isISODate("2015-04-29 17:28"));
})
})
describe("#isHTTPDate()", function() {
it("should determine whether a date is an RFC 2822 compliant date", function() {
assert.ok(Zotero.Date.isHTTPDate("Mon, 13 Jun 2016 02:09:08 +4000"));
assert.ok(Zotero.Date.isHTTPDate("13 Jun 2016 02:09:08 +4000"));
assert.ok(Zotero.Date.isHTTPDate("13 Jun 2016 02:09 +4000"));
assert.ok(Zotero.Date.isHTTPDate("13 Jun 2016 02:09 EDT"));
})
})
})