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

timezone-mock

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezone-mock - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

5

index.js

@@ -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 @@ }

2

package.json
{
"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());
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