@experium/business-days-calculator
v1.0.9
Published
Working days JS calculator for russian weekend calendar
Downloads
3
Readme
Business days calculator
Based on russian weekends calendar from gov.ru
Install
Install @experium/business-days-calculator
using npm
or yarn
.
yarn add @experium/business-days-calculator
Usage
addWorkingDays(Date, Number) : Date
Function
import { addWorkingDays } from '@experium/business-days-calculator';
const nextDeadlineWorkingDate = addWorkingDays(new Date('2019-04-30'), 2);
// Date('2019-05-07')
checkDate(Date) : Boolean
Function
import { checkDate } from '@experium/business-days-calculator';
const isWeekend = checkDate(new Date('2019-05-09'));
// true
countPeriodWeekends(Date, Date) : Number
Function
import { countPeriodWeekends } from '@experium/business-days-calculator';
const weekendsCount = countPeriodWeekends(new Date('2019-05-01'), new Date('2019-05-09'));
// 6