📜  获取日期 javascript 代码示例

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

代码示例6
function getDate()
{
    let  today         = new Date();
    let  dd         = String(today.getDate()).padStart(2, '0');
    let  mm         = String(today.getMonth() + 1).padStart(2, '0'); //janvier = 0
    let  yyyy         = today.getFullYear();

    return dd + '/' + mm + '/' + yyyy;
}