Added tests for new date snippets

This commit is contained in:
Angelos Chalaris
2018-09-29 14:29:56 +03:00
parent e8d4ad78d9
commit 29bd1d0a3c
20 changed files with 96 additions and 10 deletions

View File

@ -2,10 +2,10 @@
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.
Use `Date.prototype.toISOString()` and strict equality checking (`===`) to check if the first date is the same as the second one.
```js
const isSameDate = (dateA, dateB) => dateA === dateB;
const isSameDate = (dateA, dateB) => dateA.toISOString() === dateB.toISOString();
```
```js