Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including business-moment with all npm packages installed. Try it out:

var businessMoment = require("business-moment")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

business-moment v1.1.8

Business calendar momentjs plugin

business-moment

Build Status Coverage Status

Helpers for dealing with business days. Uses business-calendar as source.

Configuration

You can change the default configs as following:

bm.configure({
    source: 'http'
});

Sources

There are currenctly two sources, static uses a version of business-calendar installed as an npm dependency of this package.

http makes GET HTTP request, by default uses GitHub Pages as source(beware of usage limits).

Caching

You can change the cacheLifetime to change by how much time an year information can be used before being considered invalid.

Helpers

queryDateInformation(country, date, options)

Returns information from business-calendar about this day.

isBuinessDay(country, date, options)

Returns if the supplied date is a business day.

nextBusinessDay(country, date, options)

Returns the next business day after day.

License

Check here.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free