Created
May 8, 2016 16:38
-
-
Save seanmavley/91e71f63f6b89d83d1501aa982d91215 to your computer and use it in GitHub Desktop.
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
// first day of the month | |
var firstDayThisMonth = moment(firstDayThisMonth).startOf('month').toDate(); | |
Go back and forth using the subtract() and add() with the endOf() and startOf(): | |
// last day of previous month | |
var yesterMonthLastDay = moment(yesterMonthLastDay).subtract(1,'months').endOf('month').toDate(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment