I have a function call getPassportExpiryDate
:
function getPassportExpiryDate() {
return new Date(2019, 8, 17);
}
I want (2019, 8, 17)
to be dynamic instead of static date, according to the current date.
I have a function call getPassportExpiryDate
:
function getPassportExpiryDate() {
return new Date(2019, 8, 17);
}
I want (2019, 8, 17)
to be dynamic instead of static date, according to the current date.
function getPassportExpiryDate() {
return new Date();
}
console.log(getPassportExpiryDate())