Created
January 15, 2015 19:59
-
-
Save ben-bradley/db20dc4583f4e4596ac7 to your computer and use it in GitHub Desktop.
Determine week start & end in javascript
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 now = new Date(); | |
var lastSunday = new Date(); | |
var nextSunday = new Date(); | |
lastSunday.setDate(now.getDate() - now.getDay()); | |
nextSunday.setDate(lastSunday.getDate() + 7); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment