synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
12 lines (11 loc) • 306 B
JavaScript
function d(t) {
if (!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))
return !1;
const n = new Date(t);
return n instanceof Date && // Verify that the date is valid
!isNaN(n.getTime()) && n.toISOString() === t;
}
export {
d as isISOTimestamp
};
//# sourceMappingURL=DateTimeUtils.js.map