0
Q:

get current date javascript full month

var  months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var d = new Date();
var monthName=months[d.getMonth()]; // "July" (or current month)
9
new Date().getMonth(); //note that Jan=0, Dec=11 (annoying I know)
5

var d = new Date();
var n = d.getMonth();
 
1
new Date().getDate();//gets day of month (1-31)
2
var Xmas95 = new Date();
var options = { month: 'long'};
console.log(new Intl.DateTimeFormat('en-US', options).format(Xmas95));
// December
console.log(new Intl.DateTimeFormat('de-DE', options).format(Xmas95));
// Dezember
1

New to Communities?

Join the community