【发布时间】:2017-10-25 13:46:40
【问题描述】:
我正在使用 DatePipe 将格式为“2017 年 10 月 25 日”的日期字符串格式化为“2017 年 10 月 25 日”。下面是sn-p。
this.datePipe.transform('25-Oct-2017', 'yyyy-mm-dd')
它返回“2017-00-25”。
【问题讨论】:
-
mm 表示分钟。使用MM。 angular.io/api/common/DatePipe
标签: angular angular2-pipe