Answers for "check date is between two dates day.js"

2

javascript difference between two dates in days

const diffDays = (date, otherDate) => Math.ceil(Math.abs(date - otherDate) / (1000 * 60 * 60 * 24));

// Example
diffDays(new Date('2014-12-19'), new Date('2020-01-01'));   // 1839
Posted by: Guest on July-03-2020
0

check date in between two dates nodejs

let startDate = new Date('2021-12-02');
let endDate = new Date('2021-12-30');
let checkDate = new Date('2021-12-31');
if(startDate <= checkDate && endDate >= checkDate){
	console.log(123);
} else {
	console.log(456);
}
//$uj@y
Posted by: Guest on December-14-2021

Code answers related to "check date is between two dates day.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language