1.0.9 • Published 4 years ago

@experium/business-days-calculator v1.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Business days calculator

Build Status npm version

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
1.0.9

4 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago