1)moment的使用 (1) (2)moment转换为string类型 let time1 = new Date(1577808000000); console.log(moment(time1).format('YYYY/MM/DD')); // 2020/01/01