blob: 079d644a6fa8277fe5c0c2eebb1d6ac5192ac552 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// Copyright (C) 2020 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.now.plaindatetimeiso
description: Return value describes the start of a day
features: [BigInt, Temporal]
---*/
const timeZone = {
id: 'Etc/Test',
getPossibleInstantsFor() { return []; },
getOffsetNanosecondsFor(instant) {
return -Number(instant.epochNanoseconds % 86400000000000n);
}
};
const result = Temporal.Now.plainDateTimeISO(timeZone);
for (const property of ['hour', 'minute', 'second', 'millisecond', 'microsecond', 'nanosecond']) {
assert.sameValue(result[property], 0, 'The value of result[property] is expected to be 0');
}
reportCompare(0, 0);
|