calculate business days
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
.npmignore
Makefile
README.md
package.json

README.md

#Business Days

npm install business-days

var bd = require('business-days');
var day = new Date(2013, 8, 20); // Fri 9/20/13
var nextBusinessDay = bd(1, day.getFullYear(), day.getMonth(), day.getDate());
console.log(nextBusinessDay.toISOString()); // 2013-09-23T07:00:00.000Z (a Monday)

Negative time works, and if you can also call bd with one arg and that will assume you mean today as a reference.