This commit is contained in:
nishanth2143
2020-10-12 22:09:08 +05:30
committed by GitHub
parent 9e72405852
commit 45259ad4ec

View File

@ -12,7 +12,7 @@ Returns a date after adding given number of business days.
```js ```js
const addWeekDays = (startDate, count) => const addWeekDays = (startDate, count) =>
Array Array
.from({ length: businessDayCount }) .from({ length: count })
.reduce(date => { .reduce(date => {
date = new Date(date.setDate(date.getDate() + 1)); date = new Date(date.setDate(date.getDate() + 1));
if (date.getDay() % 6 === 0) if (date.getDay() % 6 === 0)