Created
December 30, 2016 02:08
-
-
Save rkdgusrnrlrl/10da75e5ce3039f584981d2c5f369bdb to your computer and use it in GitHub Desktop.
This file contains 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 date = new Date(), y = date.getFullYear(), m = date.getMonth(); | |
var firstDay = new Date(y, m, 1); | |
var lastDay = new Date(y, m + 1, 0); | |
firstDay = moment(firstDay).format(yourFormat); | |
lastDay = moment(lastDay).format(yourFormat); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment