Add the specified number of business days (mon - fri) to the given date.
Add the specified number of business days (mon - fri) to the given date, ignoring weekends.
// CommonJS var addBusinessDays = require('date-fns/addBusinessDays')
// ES 2015 import addBusinessDays from 'date-fns/addBusinessDays'
// ESM import { addBusinessDays } from 'date-fns'
addBusinessDays(date, amount)
Name | Description |
---|---|
date |
the date to be changed |
amount |
the amount of business days to be added. Positive decimals will be rounded using |
Description |
---|
the new date with the business days added |
Type | Description |
---|---|
TypeError |
2 arguments required |
// Add 10 business days to 1 September 2014: const result = addBusinessDays(new Date(2014, 8, 1), 10) //=> Mon Sep 15 2014 00:00:00 (skipped weekend days)
© 2021 Sasha Koss and Lesha Koss
Licensed under the MIT License.
https://date-fns.org/v2.29.2/docs/addBusinessDays