Angular date解析意外的输出 [英] Angular date parsing unexpected output
本文介绍了Angular date解析意外的输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用日期
动作显示日期,但是它给出了奇数的输出。
I'm trying to display a date using the date
action, but it's giving odd output.
{{ mydate | date:'mm/dd/yyyy' }}
这个月似乎不一致和不正确。这里有什么不对?
The month seems to be inconsistent and incorrect. What's wrong here?
推荐答案
您需要使用 MM
来显示月:
You need to use MM
to display the month:
{{ mydate | date:'MM/dd/yyyy' }}
'MM': Month in year, padded (01-12)
...
'mm': Minute in hour, padded (00-59)
这篇关于Angular date解析意外的输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文