0.0.3 • Published 12 months ago

@stone-ton/business-day v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months 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.3

12 months ago

0.0.2

3 years ago

0.0.1

3 years ago