Add prototype to descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-20 11:21:07 +03:00
parent 920a0c390b
commit c3a2e47672
26 changed files with 26 additions and 26 deletions

View File

@ -6,7 +6,7 @@ tags: date,intermediate
Calculates the date after adding the ginen number of business days.
- Use `Array.from()` to construct an array with `length` equal to the `count` of business days to be added.
- Use `Array.prototype.reduce()` to iterate over the array, starting from `startDate` and incrementing, using `Date.getDate()` and `Date.setDate()`.
- Use `Array.prototype.reduce()` to iterate over the array, starting from `startDate` and incrementing, using `Date.prototype.getDate()` and `Date.prototype.setDate()`.
- If the current `date` is on a weekend, update it again by adding either one day or two days to make it a weekday.
- **NOTE:** Does not take official holidays into account.