mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 02:08:58 +00:00
LibJS: Implement the ECMA-402 PlainDateTime.prototype.toLocaleString.js
This commit is contained in:
parent
224304cd56
commit
c96f6c396f
Notes:
github-actions[bot]
2024-11-29 08:53:10 +00:00
Author: https://github.com/trflynn89
Commit: c96f6c396f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2615
2 changed files with 26 additions and 5 deletions
|
@ -4,8 +4,19 @@ describe("correct behavior", () => {
|
|||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const plainDateTime = new Temporal.PlainDateTime(2021, 11, 3, 1, 33, 5, 100, 200, 300);
|
||||
expect(plainDateTime.toLocaleString()).toBe("2021-11-03T01:33:05.1002003");
|
||||
const plainDateTime = new Temporal.PlainDateTime(
|
||||
2021,
|
||||
11,
|
||||
3,
|
||||
1,
|
||||
33,
|
||||
5,
|
||||
100,
|
||||
200,
|
||||
300,
|
||||
"gregory"
|
||||
);
|
||||
expect(plainDateTime.toLocaleString()).toBe("11/3/2021, 1:33:05 AM");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue