@stone-ton/business-day
v0.0.3
Published
Verificar o próximo dia útil
Downloads
4,747
Readme
@stone-ton/business-day
Essa biblioteca tem fins para:
- Get no calendário de feriado do ano (queryDateInformation);
- Verificar o dia útil (verifyBusinessDay);
- Verificar o próximo dia útil (nextBusinessDay);
Usage
Todos os parâmetros da biblioteca são recebidos em formato de Date.
const {
queryDateInformation,
verifyBusinessDay,
nextBusinessDay
} = require('@stone-ton/business-day');
// Get holidays from years
const calendar = queryDateInformation(new Date(2022, 0, 1))
// Return boolean response that verify if the date is business day. In that case will return 'false'
const is_business_day = verifyBusinessDay(new Date(2022, 0, 1))
// Return next business day from the day given. In that case will return 2022-1-2
const next_business_day = nextBusinessDay(new Date(2022, 0, 1))
import {
queryDateInformation,
verifyBusinessDay,
nextBusinessDay
} from '@stone-ton/business-day'
// Get holidays from years
const calendar = queryDateInformation(new Date(2022, 0, 1))
// Return boolean response that verify if the date is business day. In that case will return 'false'
const is_business_day = verifyBusinessDay(new Date(2022, 0, 1))
// Return next business day from the day given. In that case will return 2022-1-2
const next_business_day = nextBusinessDay(new Date(2022, 0, 1))