Wednesday, May 9, 2018

Get the name of a month from a JavaScript date with the default date pipe built into Angular 2 and up.

For all of the Fail Whale and Flappy Bird inanities in tech, what is worse than rolling your own means for getting the friendly name for a month in JavaScript? Enough! MMMM will give the name of the month like December while MMM gives an abbreviation like Dec.

{{date_expression | date:'MMMM'}}

No comments:

Post a Comment