date-fns-tz
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0-beta.2
@@ -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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215550
167
3542