daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Feb 17th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ```javascript
  2. const prevMonthFirstDay = moment().subtract(1, 'months').date(1);
  3.  
  4. const nextMonthLastDay = moment().add(2, 'months').date(0);
  5. ```
  6.  
  7. or
  8.  
  9. ```javascript
  10. const prevMonthFirstDay = moment().subtract(1, 'months').startOf('month');
  11.  
  12. const nextMonthLastDay = moment().add(1, 'months').endOf('month');
  13. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top