방법 1

var date = new Date();

var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);

var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);

 

방법 2

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);

+ Recent posts