2022-02-01 11:58:02 +01:00
|
|
|
// 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]
|
|
|
|
---*/
|
|
|
|
|
2024-06-04 11:25:38 +02:00
|
|
|
const ym1 = new Temporal.PlainYearMonth(2000, 1, "iso8601", 1);
|
|
|
|
const ym2 = new Temporal.PlainYearMonth(2000, 1, "iso8601", 2);
|
2022-02-01 11:58:02 +01:00
|
|
|
assert.sameValue(Temporal.PlainYearMonth.compare(ym1, ym2), -1);
|