Created
April 30, 2018 06:56
-
-
Save iworkforthem/6ce597253462edbce4d1817ed58957d6 to your computer and use it in GitHub Desktop.
Get the firstDay & lastDay of each Quarter.
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 = new Date(); | |
| var quarter = Math.floor((today.getMonth() / 3)); | |
| var firstDay = new Date(today.getFullYear(), quarter * 3, 1); | |
| var lastDay = new Date(firstDay.getFullYear(), firstDay.getMonth() + 3, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment