Skip to main content

Angular2 - DatePipe period in lower case.

· One min read

There are several occasions customer would have requested to change the date format in your application to be in small case as follows.

Tuesday, December 19, 7:00 am 

Since the date format does not support the above format, either we can display entire thing in small case with the  lowercase pipe

Since it converts the whole format in lowercase, you can split it in two and apply the lowercase only for the period as follows

{1234567 | Date:'EEEE, MMMM d, h:mm '} {1234567 l Date:' a' | lowercase }

that's it, it is easier rather than using a custom pipe! Here is the working demo

Ask Sajee

A contact guide, not live chat.

What would you like help with?