mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:57:35 +00:00
LibJS: Implement Temporal.PlainDateTime.prototype.toPlainMonthDay()
This commit is contained in:
parent
5573efa3bd
commit
fc58f93734
3 changed files with 41 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
describe("correct behavior", () => {
|
||||
test("length is 0", () => {
|
||||
expect(Temporal.PlainDateTime.prototype.toPlainMonthDay).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("basic functionality", () => {
|
||||
const plainDateTime = new Temporal.PlainDateTime(2021, 7, 6, 18, 14, 47);
|
||||
const plainMonthDay = plainDateTime.toPlainMonthDay();
|
||||
expect(plainMonthDay.calendar).toBe(plainDateTime.calendar);
|
||||
expect(plainMonthDay.monthCode).toBe("M07");
|
||||
expect(plainMonthDay.day).toBe(6);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue