Horje
javascript subtract years from date Code Example
javascript subtract days from date
var myCurrentDate=new Date();
var myPastDate=new Date(myCurrentDate);
    myPastDate.setDate(myPastDate.getDate() - 8);//myPastDate is now 8 days in the past
javascript subtract years from date
var date = new Date(); 
date.setDate(date.getDate() + days);
date.setMonth(date.getMonth() + months);
date.setFullYear(date.getFullYear() + years);
console.log((date.getMonth() ) + '/' + (date.getDate()) + '/' + (date.getFullYear()));
js subtract days
var dateOffset = (24*60*60*1000) * 5; //5 days
var myDate = new Date();
myDate.setTime(myDate.getTime() - dateOffset);
js date minus 18 years
use moment.js




Javascript

Related
javascript get middle of array Code Example javascript get middle of array Code Example
how to change background image dynamically in react Code Example how to change background image dynamically in react Code Example
select sibling javascript Code Example select sibling javascript Code Example
jQuery hasClass() - check for more than one class Code Example jQuery hasClass() - check for more than one class Code Example
Refused to execute inline script because it violates the following Content Security Policy directive Code Example Refused to execute inline script because it violates the following Content Security Policy directive Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10