UNPKG

@storm-stack/date-time

Version:

This package includes a DateTime class, various utility functions for working with dates and times, and a number of formatting options.

11 lines (10 loc) 368 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isInstant = isInstant; var _polyfill = require("@js-temporal/polyfill"); var _types = require("@storm-stack/types"); function isInstant(value) { return (0, _types.isSet)(value) && (value instanceof _polyfill.Temporal.Instant || (0, _types.isFunction)(value?.toZonedDateTime)); }