Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var date = new Date();
- var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
- var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
- var monthLastDay = Math.floor(lastDay.getTime()/1000);
- console.log(monthLastDay);
- 1527705000
- Is equivalent to:
- 05/30/2018 @ 6:30pm (UTC)
Add Comment
Please, Sign In to add comment