Answers for "get year month and date in javascript"

4

how to get only month and year in js

let dateObj = new Date();

let myDate = (dateObj.getUTCFullYear()) + "/" + (dateObj.getMonth() + 1)+ "/" + (dateObj.getUTCDate());
Posted by: Guest on May-14-2020
2

get current date javascript full month

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
Posted by: Guest on July-11-2020

Code answers related to "get year month and date in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language