Created
December 5, 2019 23:16
-
-
Save frankiehayward/6b2ee444c9b32cf51cc318a1a8d3bc61 to your computer and use it in GitHub Desktop.
This snippet can be used to check whether a date is before another date.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const isBeforeDate = (dateA, dateB) => dateA < dateB; | |
| isBeforeDate(new Date(2010, 10, 20), new Date(2010, 10, 21)); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment