🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
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

A utility to work out the difference between two dates but ignoring weekends

1.0.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

moment-weekend

Using the moment.js to work out the number of days passed NOT including the weekend.

var moment = require('moment');
var weekend = require('moment-weekend');

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

Keywords

momentjs

FAQs

Package last updated on 20 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts