Add isBeforeDate, isAfterDate, isSameDate

This commit is contained in:
Angelos Chalaris
2018-09-29 13:58:38 +03:00
parent bd04a9e9ac
commit 08509a2aed
15 changed files with 55 additions and 17 deletions

View File

@ -6,7 +6,7 @@ Use `Array.prototype.reduce()` to calculate how many numbers are below the value
```js
const percentile = (arr, val) =>
(100 * arr.reduce((acc, v) => acc + (v < val ? 1 : 0) + (v === val ? 0.5 : 0), 0)) / arr.length;
100 * arr.reduce((acc, v) => acc + (v < val ? 1 : 0) + (v === val ? 0.5 : 0), 0) / arr.length;
```
```js