You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

moment-weekend

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moment-weekend - npm Package Compare versions

Comparing version

to
1.0.1

2

package.json
{
"name": "moment-weekend",
"version": "1.0.0",
"version": "1.0.1",
"description": "A utility to work out the difference between two dates but ignoring weekends",

@@ -5,0 +5,0 @@ "main": "weekend.js",

@@ -7,7 +7,10 @@ moment-weekend

```
var moment = require('moment');
var weekend = require('moment-weekend');
var start = moment("2015-02-12");
var end = moment("2015-02-17");
var result = weekend.diff(start, end); // result = 3
var start = moment("2015-02-12", "YYYY-MM-DD")
var end = moment("2015-02-17", "YYYY-MM-DD")
var result = weekend.diff(start, end);
// result = 3
```

@@ -13,3 +13,3 @@ var weekend = require('../weekend');

it("end date is not a moment should return error", function(){
var start = moment("2015-02-12");
var start = moment("2015-02-12", "YYYY-MM-DD")
expect(function() { weekend.diff(start, null)})

@@ -20,4 +20,4 @@ .toThrow(new Error("end date is not a moment"));

it("test", function(){
var start = moment("2015-02-12");
var end = moment("2015-02-17");
var start = moment("2015-02-12", "YYYY-MM-DD")
var end = moment("2015-02-17", "YYYY-MM-DD")
var result = weekend.diff(start, end);

@@ -24,0 +24,0 @@

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.