angular.filter.date

Usage

In HTML Template Binding

{{ date_expression | date:format }}

In JavaScript

angular.filter.date(date, format);

Parameters

Returns

{string} Formatted string or the input if input is not recognized as date/millis.

CSS

Description

Formats date to a string based on the requested format.

format string can be composed of the following elements:

<span ng:non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>: {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}<br/> <span ng:non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>: {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}<br/>