📅  最后修改于: 2022-03-11 15:02:23.898000             🧑  作者: Mango
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var today = new Date();
// Show date in "dd-mm-yyyy' format.
var d = today.getDate();
var m = months[today.getMonth()];
var y = months.getFullYear();
console.log(d + "-" + m + "-" + y);