timezone-mock
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -219,3 +219,3 @@ 'use strict'; | ||
MockDate.prototype.toLocaleString = function (locales, options) { | ||
options = options || {}; | ||
options = Object.assign({ timeZone: timezone }, options); | ||
var time = this.d.getTime(); | ||
@@ -225,3 +225,2 @@ if (Number.isNaN(time)) { | ||
} | ||
options.timeZone = timezone; | ||
return new _Date(time).toLocaleString(locales, options); | ||
@@ -231,3 +230,3 @@ }; | ||
MockDate.prototype.toLocaleDateString = function (locales, options) { | ||
options = options || {}; | ||
options = Object.assign({ timeZone: timezone }, options); | ||
var time = this.d.getTime(); | ||
@@ -237,3 +236,2 @@ if (Number.isNaN(time)) { | ||
} | ||
options.timeZone = timezone; | ||
return new _Date(time).toLocaleDateString(locales, options); | ||
@@ -243,3 +241,3 @@ }; | ||
MockDate.prototype.toLocaleTimeString = function (locales, options) { | ||
options = options || {}; | ||
options = Object.assign({ timeZone: timezone }, options); | ||
var time = this.d.getTime(); | ||
@@ -249,3 +247,2 @@ if (Number.isNaN(time)) { | ||
} | ||
options.timeZone = timezone; | ||
return new _Date(time).toLocaleTimeString(locales, options); | ||
@@ -252,0 +249,0 @@ }; |
{ | ||
"name": "timezone-mock", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A JavaScript library to mock the local timezone.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
32849
1194