bizdays-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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

Locale Description
pt-BR Brazilian Portuguese

Made with ❤ by Vine

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i bizdays-js

    Weekly Downloads

    0

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    40 kB

    Total Files

    6

    Last publish

    Collaborators

    • vinebarbosa