Search code examples
javascriptangularjsdatefilter

Why the month in Angular date filter is capitalised?


I'm afraid if this question doesn't fit in this context.I wanted to know why the month (MM) of date filter in Angular in-built date filter is capitalised while the date(dd) and year(yyyy) are written in small letters.It dosen't work if I apply mm to the filter.

Sample Code: <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>

Ref: Angular Date Filters


Solution

  • Its is used to differentiate between months(MM) and minutes(mm).

    Also as RGraham, has said, you will find that in most of the languages it is treated like that and more or less it has become a standard.