LibJS: Implement the ECMA-402 PlainDate.prototype.toLocaleString.js

This commit is contained in:
Timothy Flynn 2024-11-27 16:18:40 -05:00 committed by Andreas Kling
commit 697e68e68f
Notes: github-actions[bot] 2024-11-29 08:53:34 +00:00
2 changed files with 14 additions and 7 deletions

View file

@ -6,11 +6,8 @@ describe("correct behavior", () => {
test("basic functionality", () => {
let plainDate;
plainDate = new Temporal.PlainDate(2021, 7, 6);
expect(plainDate.toLocaleString()).toBe("2021-07-06");
plainDate = new Temporal.PlainDate(2021, 7, 6, "gregory");
expect(plainDate.toLocaleString()).toBe("2021-07-06[u-ca=gregory]");
expect(plainDate.toLocaleString()).toBe("7/6/2021");
});
});