not-same-object.js (642B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2021 Igalia, S.L. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-temporal.plaindate.compare 7 description: Dates are equal even if they are not the same object 8 features: [Temporal] 9 ---*/ 10 11 const date1 = new Temporal.PlainDate(1914, 2, 23); 12 const date2 = new Temporal.PlainDate(1914, 2, 23); 13 14 assert.sameValue(Temporal.PlainDate.compare(date1, date1), 0, "same object"); 15 assert.sameValue(Temporal.PlainDate.compare(date1, date2), 0, "same date"); 16 17 reportCompare(0, 0);