mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/66697 Refs: https://github.com/nodejs/node/pull/65992 Refs: https://github.com/nodejs/node/pull/66183 Reviewed-By: Stewart X Addison <sxa@redhat.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
18 lines
585 B
JavaScript
18 lines
585 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
if (!common.hasTemporal) {
|
|
common.skip('Temporal is not enabled');
|
|
}
|
|
|
|
// TODO(legendecas): bundle zoneinfo data for small ICU.
|
|
if (globalThis.Intl && !common.hasFullICU) {
|
|
common.skip('Time zone support unavailable when built with small ICU');
|
|
}
|
|
|
|
// Use globalThis.Temporal to workaround linter complaints.
|
|
assert.strictEqual(typeof globalThis.Temporal, 'object');
|
|
const pdt = globalThis.Temporal.Instant.from('1969-07-20T20:17:00Z');
|
|
assert.strictEqual(pdt.toString(), '1969-07-20T20:17:00Z');
|