我已经尝试为我的项目 SugarJS 使用新模块。我可以打印日期,但无法格式化。这是我的代码
const Sugar = require('sugar')
let yesterday = Sugar.Date.create()
let yesterdayWithFormat = Sugar.Date.create().format("{dd}")
昨天的输出是2019-10-14T06:52:28.466Z昨天的WithFormat错误Sugar.Date.create(...).format is not a function
任何人都可以帮助我吗?