Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

month start date and end date in js

const moment = require('moment');

let year = '2022';
let month = '2';
let startDate = moment([year, month - 1]);
let endDate = moment(startDate).endOf('month');

console.log(startDate, endDate);
Source by melvingeorge.me #
 
PREVIOUS NEXT
Tagged: #month #start #date #date #js
ADD COMMENT
Topic
Name
2+3 =