Angular js 日期格式

Angular js Date Formatting

我想在 angular js
中将日期格式从 10/07/2015(mm/dd/yyyy) 更改为 oct 7 ,2015 我正在使用 {{'10/07/2015' | date:'longDate'}} 并给我相同的日期 '10/07/2015' 作为输出 谁能帮我解决这个问题?

作为 per the documentation,您必须以特定方式设置日期格式才能使日期过滤器正常工作:

文档:

Date to format either as Date object, milliseconds (string or number) or various >ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter >versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone >is specified in the string input, the time is considered to be in the local >timezone.

ISO 格式示例:

<div>{{ "2015-10-07" | date:'longDate' }}</div>

Fiddle