1. 程式人生 > 其它 >day.js如何顯示成中文格式的時間

day.js如何顯示成中文格式的時間

技術標籤:javascripthtml

day.js如何顯示成中文格式的時間

    let d=dayjs().format("YYYY[年]-MM[月]-DD[日]") //要自定義字元需要加中括號
    console.log(d)  //2020年-12月-14日