Answers for "get the months day with the months numer js"

1

get 5 months after date in javascript

var currentDate = new Date();
var expiryDate = new Date();
expiryDate.setMonth(expiryDate.getMonth() + 3);
console.log(currentDate);
console.log(expiryDate);

//$uj@y
Posted by: Guest on December-14-2021
0

months js

const months = Array.from({ length: 12 }, (_, monthNumber) => {
    const date = new Date(0, monthNumber);
    return date.toLocaleDateString('pt-BR', {month: "long"});
})

// ['janeiro', 'fevereiro'....]
Posted by: Guest on March-04-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language