angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

date filter should support string representation of days and months

Open IgorMinar opened this issue 15 years ago • 3 comments

e.g. Monday or Mon for days and Jan or January for months

IgorMinar avatar Jun 17 '11 21:06 IgorMinar

The initial solution might be non-i18n compatible, but we should keep in mind that soon we'll need a i18n compatible version.

IgorMinar avatar Jun 22 '11 16:06 IgorMinar

some examples of what we want to be able to do:

{{ someDate | date:"MON YYYY"}} -> "Jun 2004"
{{ someDate | date"MONTH YYYY}} -> "June 2004"

the same should be possible with days

IgorMinar avatar Jun 22 '11 16:06 IgorMinar

There is a standardized format at : http://www.unicode.org/reports/tr35/#Date_Field_Symbol_Table

So {{ someDate | data:"EEE, MMM d, yyyy" }} -> "Wed, Jul 10, 2011"

Codier avatar Jun 22 '11 18:06 Codier