mirror of
https://github.com/nodejs/node.git
synced 2025-12-27 23:41:14 +00:00
PR-URL: https://github.com/nodejs/node/pull/60703 Refs: https://github.com/nodejs/node/issues/58730 Refs: https://github.com/nodejs/node/pull/60693 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
20 lines
655 B
JavaScript
20 lines
655 B
JavaScript
// Flags: --harmony-temporal
|
|
|
|
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
if (!process.config.variables.v8_enable_temporal_support) {
|
|
common.skip('Temporal is not enabled');
|
|
}
|
|
|
|
// TODO(legendecas): bundle zoneinfo data for small ICU and without ICU builds.
|
|
if (!common.hasFullICU) {
|
|
common.skip('Time zone support unavailable when not built with full 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');
|