var monthArr = new Array("Jan", "Feb", "Mar",
"Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec");
var d = new Date("2018-01-01");
var cdate = d.getDate();
var cmonth = d.getMonth();
var cyear = d.getFullYear();
alert(cdate + "-" +monthArr [ cmonth]
+ "-" + cyear);
"Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec");
var d = new Date("2018-01-01");
var cdate = d.getDate();
var cmonth = d.getMonth();
var cyear = d.getFullYear();
alert(cdate + "-" +monthArr [ cmonth]
+ "-" + cyear);
No comments:
Post a Comment