mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.toPlainDate()
This commit is contained in:
parent
61b2780853
commit
18fd0d4011
4 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
describe("normal behavior", () => {
|
||||
test("length is 0", () => {
|
||||
expect(Temporal.PlainDateTime.prototype.toPlainDate).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const plainDateTime = new Temporal.PlainDateTime(2021, 7, 23, 0, 32, 18, 123, 456, 789);
|
||||
const plainDate = plainDateTime.toPlainDate();
|
||||
expect(plainDate.equals(new Temporal.PlainDate(2021, 7, 23))).toBeTrue();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue