Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

date-fns-tz

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-fns-tz - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

3

dist/cjs/format/formatters/index.js

@@ -86,5 +86,6 @@ "use strict";

function getTimeZoneOffset(timeZone, originalDate) {
var _a;
const timeZoneOffset = timeZone
? (0, index_js_2.tzParseTimezone)(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE
: originalDate.getTimezoneOffset();
: ((_a = originalDate === null || originalDate === void 0 ? void 0 : originalDate.getTimezoneOffset()) !== null && _a !== void 0 ? _a : 0);
if (Number.isNaN(timeZoneOffset)) {

@@ -91,0 +92,0 @@ throw new RangeError('Invalid time zone specified: ' + timeZone);

@@ -85,3 +85,3 @@ import { tzIntlTimeZoneName } from '../../_lib/tzIntlTimeZoneName/index.js';

? tzParseTimezone(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE
: originalDate.getTimezoneOffset();
: (originalDate?.getTimezoneOffset() ?? 0);
if (Number.isNaN(timeZoneOffset)) {

@@ -88,0 +88,0 @@ throw new RangeError('Invalid time zone specified: ' + timeZone);

{
"name": "date-fns-tz",
"version": "3.1.0",
"version": "3.1.1",
"sideEffects": false,

@@ -5,0 +5,0 @@ "description": "Time zone support for date-fns v3 with the Intl API",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc