Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / intl402 / Temporal / Calendar / prototype / yearOfWeek / non-iso-week-of-year.js
blob9abf674f0fe53e56ebdd3de928331f7fb33ed160
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2024 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-temporal.calendar.prototype.yearofweek
7 description: >
8   Temporal.Calendar.prototype.yearOfWeek returns undefined for all 
9   non-ISO calendars without a well-defined week numbering system.
10 features: [Temporal]
11 ---*/
13 // Gregorian calendar has a well defined week-numbering system.
15 let calendar = new Temporal.Calendar("gregory");
16 const date = { month: 1, day: 1, year: 2024, calendar};
18 assert.sameValue(calendar.yearOfWeek({...date}), 2024);
20 calendar = new Temporal.Calendar("hebrew");
21 const nonisodate = { month: 1, day: 1, year: 2024, calendar};
23 assert.sameValue(calendar.yearOfWeek({...nonisodate}), undefined);
25 reportCompare(0, 0);