1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2023 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
6 esid: sec-temporal.plaindate.prototype.dayofyear
8 Calling the method on an instance constructed with a builtin calendar causes
9 no observable lookups or calls to calendar methods.
10 includes: [temporalHelpers.js]
14 const dayOfYearOriginal = Object.getOwnPropertyDescriptor(Temporal.Calendar.prototype, "dayOfYear");
15 Object.defineProperty(Temporal.Calendar.prototype, "dayOfYear", {
19 TemporalHelpers.assertUnreachable("dayOfYear should not be looked up");
23 const instance = new Temporal.PlainDate(2000, 5, 2, "iso8601");
26 Object.defineProperty(Temporal.Calendar.prototype, "dayOfYear", dayOfYearOriginal);