LibJS: Implement Temporal.Calendar.prototype.dayOfYear

This commit is contained in:
Idan Horowitz 2021-07-23 17:58:44 +03:00 committed by Linus Groh
commit c0e7761758
Notes: sideshowbarker 2024-07-18 08:27:44 +09:00
6 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,11 @@
describe("correct behavior", () => {
test("length is 1", () => {
expect(Temporal.Calendar.prototype.dayOfYear).toHaveLength(1);
});
test("basic functionality", () => {
const calendar = new Temporal.Calendar("iso8601");
const date = new Temporal.PlainDate(2021, 7, 23);
expect(calendar.dayOfYear(date)).toBe(204);
});
});