I want to use the date pipe in angular 2. but I need this output: Wednesday.
I know I can get this.
{{ strDate | date :'fullDate' }}
Output will be: Monday, November 7, 2016.
but I don't want the year.
or this.
{{ strDate | date :'longDate'}}
Output will be: November 7, 2016,
also, don't want the year.
how can I get just the weekday or November 7.
Check out the Angular documentation
It describes that you can define your desired output string by using an ISO string. In your case, the following entry should have the output you desire:
{{ strDate | date :'EEEE'}} -> Saturday
{{ strDate | date :'MMMM d'}} -> May 20
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With