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,9 +6,8 @@ Use `new Date()` and `Date.prototype.getFullYear()` to get the first day of the
Use `Math.floor()` to appropriately round the resulting day count to an integer.
```js
const dayOfYear = date => Math.floor(
(date - new Date(date.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24
);
const dayOfYear = date =>
Math.floor((date - new Date(date.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24);
```
```js