📌  相关文章
📜  在javascript代码示例中只获取日期的一天

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

代码示例2
var dateObj = new Date();
var month = dateObj.getUTCMonth() + 1; //months from 1-12
var day = dateObj.getUTCDate();
var year = dateObj.getUTCFullYear();

newdate = year + "/" + month + "/" + day;