timezone-mock
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -17,3 +17,3 @@ var assert = require('assert'); | ||
function MockDate(param, month, date, hours, minutes, seconds, milliseconds) { | ||
function MockDate(param) { | ||
if (arguments.length === 1) { | ||
@@ -37,5 +37,4 @@ if (param instanceof MockDate) { | ||
} else { | ||
var year = param; | ||
this.d = new _Date(); | ||
this.fromLocal(new _Date(_Date.UTC(year, month, date, hours, minutes, seconds, milliseconds))); | ||
this.fromLocal(new _Date(_Date.UTC.apply(null, arguments))); | ||
} | ||
@@ -42,0 +41,0 @@ } |
{ | ||
"name": "timezone-mock", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A JavaScript library to mock the local timezone.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -48,1 +48,5 @@ var assert = require('assert'); | ||
assert.equal(1495821155000, new Date('2017-05-26 10:52:35 -07:00').getTime()); | ||
////////////////////////////////////////////////////////////////////////// | ||
// Test some generic properties about the date object | ||
assert.equal(new Date(2017, 5).getTime(), new Date(2017, 5, 1, 0, 0, 0, 0).getTime()); |
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
24222
625