📌  相关文章
📜  javascript 日期两位数月份 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:42.559000             🧑  作者: Mango

代码示例1
var MyDate = new Date();
var MyDateString;

MyDate.setDate(MyDate.getDate() + 20);

MyDateString = ('0' + MyDate.getDate()).slice(-2) + '/'
             + ('0' + (MyDate.getMonth()+1)).slice(-2) + '/'
             + MyDate.getFullYear();