mirror of https://github.com/tc39/test262.git
36 lines
792 B
JavaScript
36 lines
792 B
JavaScript
// 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.from
|
|
description: >
|
|
Converting an object implementing the Calendar protocol to Temporal.Calendar
|
|
gives the same object
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
const custom = {
|
|
dateAdd() {},
|
|
dateFromFields() {},
|
|
dateUntil() {},
|
|
day() {},
|
|
dayOfWeek() {},
|
|
dayOfYear() {},
|
|
daysInMonth() {},
|
|
daysInWeek() {},
|
|
daysInYear() {},
|
|
fields() {},
|
|
id: "custom-calendar",
|
|
inLeapYear() {},
|
|
mergeFields() {},
|
|
month() {},
|
|
monthCode() {},
|
|
monthDayFromFields() {},
|
|
monthsInYear() {},
|
|
weekOfYear() {},
|
|
year() {},
|
|
yearMonthFromFields() {},
|
|
yearOfWeek() {},
|
|
};
|
|
assert.sameValue(Temporal.Calendar.from(custom), custom);
|