安装
npm install moment --save
格式化日期:
moment().format('MMMM Do YYYY, h:mm:ss a'); // 一月 24日 2024, 2:32:19 下午
moment().format('dddd'); // 星期三
moment().format("MMM Do YY"); // 1月 24日 24
moment().format('YYYY [escaped] YYYY'); // 2024 escaped 2024
moment().format();