Date Pipe does not apply format


#1

Why do these two lines return the same result?

  {{myDate | date:'dd/MM/yy'}}
  {{myDate | date:'MM/dd/yy'}}

I expected the first one returns 25/12/15, and the second one 12/25/15, for example.

Thank you


#2

See this post.


#3

Do you know if it is a bug that is planned to be fixed? Is it an Angular2 bug or Ionic2 one?

Thank you


#4

It’s documented:

In javascript, only the components specified will be respected (not the ordering, punctuations, …) and details of the formatting will be dependent on the locale

So I wouldn’t expect anything to change.


#5

It isn’t an issue in Angular 2 and it is 2017 and this pipe issue in Ionic 2 still exists.