After using currentDate = new Date();
in my typescript file
and attempting to display it with {{currentDate}}
, the full format appeared as
Sun Aug 06 2017 15:36:11 GMT+0530 (IST)
.
Referring to AngularDatePipe, I changed it to {{currentDate | date}}
, resulting in a format like Aug 6, 2017
. However, I am looking to only display the day with the first 3 characters such as Sun, Sat, etc. Is there a way to extract this from the format of
Sun Aug 06 2017 15:36:11 GMT+0530 (IST)
?