1.0.4 • Published 3 years ago

bizdays-js v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

bizdays-js License

Biszdays is a simple library for working with business days.

Installation

This is a Node.js module available through the npm registry. Installation is done using one of the commands below

If you are using npm:

npm install bizdays-js

If you are using yarn:

yarn add bizdays-js

Usage

import bizdays from 'bizdays-js';

const today = new Date();

bizdays.setLocale('pt-BR');

console.log(bizdays.isBizday(today)) // shows true if today is a business day

console.log(bizdays.isHoliday(today)) // shows true if today is a holiday

console.log(bizdays.isWeekend(today)) // shows true if today is a weekend

const nextBusinessDay = bizdays.following(today) // get the next business day
console.log(nextBusinessDay)

const previousBusinessDay = bizdays.previous(today) // get the previous business day
console.log(previousBusinessDay)

Library Supported Locales

LocaleDescription
pt-BRBrazilian Portuguese
1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago