Created
November 26, 2019 17:06
-
-
Save adamculpepper/13b8ff6b57a82def7efe12cd0b4571c4 to your computer and use it in GitHub Desktop.
Moment.JS Snippets
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
var today = moment(); | |
var tomorrow = moment().add(1, 'day'); | |
var isToday = function(input) { | |
return moment(input).isSame(today, 'day'); | |
}; | |
var isTomorrow = function(input) { | |
return moment(input).isSame(tomorrow, 'day'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment