0.0.2 • Published 1 year ago

@stone-ton/business-day v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@stone-ton/business-day

Essa biblioteca tem fins para: 1. Get no calendário de feriado do ano (queryDateInformation); 2. Verificar o dia útil (verifyBusinessDay); 3. 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))
0.0.2

1 year ago

0.0.1

2 years ago