Guest User

Untitled

a guest
May 9th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. var date = new Date();
  2. var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
  3. var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
  4. var monthLastDay = Math.floor(lastDay.getTime()/1000);
  5. console.log(monthLastDay);
  6.  
  7. 1527705000
  8. Is equivalent to:
  9. 05/30/2018 @ 6:30pm (UTC)
Add Comment
Please, Sign In to add comment