Use String.fromCharCode() to load Chinese characters in strToDate() test
Follow-up to dc045250a6
This commit is contained in:
parent
56151a4198
commit
3fb9e2162e
2 changed files with 4 additions and 2 deletions
|
@ -199,7 +199,9 @@ describe("Zotero.Date", function() {
|
|||
it("should parse Chinese month", function () {
|
||||
Zotero.locale = 'zh-CN';
|
||||
Zotero.Date.init();
|
||||
var o = Zotero.Date.strToDate("四月 26, 2010");
|
||||
var o = Zotero.Date.strToDate(
|
||||
String.fromCharCode(0x56DB) + String.fromCharCode(0x6708) + " 26, 2010"
|
||||
);
|
||||
assert.equal(o.month, 3);
|
||||
assert.equal(o.day, 26);
|
||||
assert.equal(o.year, 2010);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue