Angular2 DatePipe processing ISO 8601 Date (Invalid argument '*' for pipe 'DatePipe')?
问题 I've just tried to use a simple date pipe in my angular2 app: Registered: {{user.registered | date:'shortDate'}} The error I get is: Invalid argument '2016-03-28T07:25:40.824Z' for pipe 'DatePipe' in [{{user && user.registered | date:'shortDate' }} in UserDialog@16:57] I do have a User model (minimal here) shared between this component and some others: export class User { public registered: Date; } I get the user data as JSON from backend, and it's a ISO 8601: 2016-03-28T07:26:01.202Z . When