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

13
snippets/isSameDate.md Normal file
View File

@ -0,0 +1,13 @@
### isSameDate
Check if a date is the same as another date.
Use strict equality checking (`===`) to check if the first date is the same as the second one.
```js
const isSameDate = (dateA, dateB) => dateA === dateB;
```
```js
isSameDate(new Date(2010, 10, 20), new Date(2010, 10, 20)); // true
```