javascript get the day of the month code example
Example 1: Javascript get month name
var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var d = new Date();
var monthName=months[d.getMonth()];
Example 2: javascript get current day of month
new Date().getDate();
Example 3: js get day month year
const d = new Date();
d.getMonth() + 1;
d.getDate();
d.getFullYear();
Example 4: how to get date time day year in javscript
var today = new Date();
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();