mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainMonthDay()
This commit is contained in:
parent
ef581be4ec
commit
6ce05026b4
3 changed files with 53 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 0", () => {
|
||||
expect(Temporal.ZonedDateTime.prototype.toPlainMonthDay).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const timeZone = new Temporal.TimeZone("UTC");
|
||||
const zonedDateTime = new Temporal.ZonedDateTime(1625614921000000000n, timeZone);
|
||||
const plainMonthDay = zonedDateTime.toPlainMonthDay();
|
||||
expect(plainMonthDay.calendar).toBe(zonedDateTime.calendar);
|
||||
expect(plainMonthDay.monthCode).toBe("M07");
|
||||
expect(plainMonthDay.day).toBe(6);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue