安装 npm install itheima-tools 导入 const itheima = require('itheima-tools') 格式化时间 // 调用dateFormate方法对时间进行格式化 const dtStr = itheima.dateFormat(new Date()) 开源协议 ISC