Tuesday, 24 March 2020

How to get the last day of the previous month in Javascript

var d=new Date(); // current date
d.setDate(1); // going to 1st of the month
d.setHours(-1); // going to last hour before this date even started.

https://stackoverflow.com/questions/9100676/how-to-get-the-last-day-of-the-previous-month-in-javascript-or-jquery

No comments:

Post a comment