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.0.0-beta.1 to 3.0.0-beta.2

_lib/getTimezoneOffsetInMilliseconds/index.js

2

esm/toDate/index.js

@@ -1,2 +0,2 @@

import { getTimezoneOffsetInMilliseconds } from 'date-fns/_lib/getTimezoneOffsetInMilliseconds'
import { getTimezoneOffsetInMilliseconds } from '../_lib/getTimezoneOffsetInMilliseconds/index.js'
import tzParseTimezone from '../_lib/tzParseTimezone/index.js'

@@ -3,0 +3,0 @@ import tzPattern from '../_lib/tzPattern/index.js'

{
"name": "date-fns-tz",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"sideEffects": false,

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

@@ -7,5 +7,5 @@ "use strict";

exports["default"] = toDate;
var _getTimezoneOffsetInMilliseconds = require("date-fns/_lib/getTimezoneOffsetInMilliseconds");
var _index = _interopRequireDefault(require("../_lib/tzParseTimezone/index.js"));
var _index2 = _interopRequireDefault(require("../_lib/tzPattern/index.js"));
var _index = require("../_lib/getTimezoneOffsetInMilliseconds/index.js");
var _index2 = _interopRequireDefault(require("../_lib/tzParseTimezone/index.js"));
var _index3 = _interopRequireDefault(require("../_lib/tzPattern/index.js"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -45,3 +45,3 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

// time zone tokens (to identify the presence of a tz)
timeZone: _index2["default"]
timeZone: _index3["default"]
};

@@ -131,3 +131,3 @@

if (dateStrings.timeZone || options.timeZone) {
offset = (0, _index["default"])(dateStrings.timeZone || options.timeZone, new Date(timestamp + time));
offset = (0, _index2["default"])(dateStrings.timeZone || options.timeZone, new Date(timestamp + time));
if (isNaN(offset)) {

@@ -138,4 +138,4 @@ return new Date(NaN);

// get offset accurate to hour in time zones that change offset
offset = (0, _getTimezoneOffsetInMilliseconds.getTimezoneOffsetInMilliseconds)(new Date(timestamp + time));
offset = (0, _getTimezoneOffsetInMilliseconds.getTimezoneOffsetInMilliseconds)(new Date(timestamp + time + offset));
offset = (0, _index.getTimezoneOffsetInMilliseconds)(new Date(timestamp + time));
offset = (0, _index.getTimezoneOffsetInMilliseconds)(new Date(timestamp + time + offset));
}

@@ -142,0 +142,0 @@ return new Date(timestamp + time + offset);

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