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

/*---
esid: sec-temporal.plainyearmonth.compare
description: compare() takes the reference day into account
features: [Temporal]
---*/

const iso = Temporal.Calendar.from("iso8601");
const ym1 = new Temporal.PlainYearMonth(2000, 1, iso, 1);
const ym2 = new Temporal.PlainYearMonth(2000, 1, iso, 2);
assert.sameValue(Temporal.PlainYearMonth.compare(ym1, ym2), -1);

reportCompare(0, 0);