summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/Calendar/prototype/weekOfYear/cross-year.js
blob: d65ef91a264179b2da72da1ae21ba69b9947ed09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-temporal.calendar.prototype.weekofyear
description: weekOfYear() crossing year boundaries.
features: [Temporal]
---*/

const iso = Temporal.Calendar.from("iso8601");
assert.sameValue(iso.weekOfYear(Temporal.PlainDate.from("2019-12-31")), 1, "week 1 from next year");
assert.sameValue(iso.weekOfYear(Temporal.PlainDate.from("2021-01-01")), 53, "week 1 from next year");

reportCompare(0, 0);