Answers for "get first and last day of previous month from current date in javascript"

11

get the first day and last day of current mongth javascript

var date = new Date();
var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
Posted by: Guest on May-02-2020
0

javascript first and last day of the month

var date = new Date(), y = date.getFullYear(), m = date.getMonth();
var firstDay = new Date(y, m, 1);
var lastDay = new Date(y, m + 1, 0);
Posted by: Guest on January-28-2022

Code answers related to "get first and last day of previous month from current date in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language