From b5a510a343270f499cbb8b8a9ac3a3309e9b7ce2 Mon Sep 17 00:00:00 2001 From: Di Peng Date: Wed, 22 Jun 2011 12:33:31 -0700 Subject: feat:filter.date: add day/month string format support Support new date format, specifically day of week/Month of year in string e.g. {{ someDate | data:"EEE, MMM d, yyyy" }} -> "Wed, Jul 10, 2011" Closes #396 --- test/FiltersSpec.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/FiltersSpec.js') diff --git a/test/FiltersSpec.js b/test/FiltersSpec.js index 49b548b1..0a6b9124 100644 --- a/test/FiltersSpec.js +++ b/test/FiltersSpec.js @@ -149,6 +149,12 @@ describe('filter', function() { expect(filter.date(noon, "yyyy-MM-dd hh=HH:mm:ssaZ")). toEqual('2010-09-03 12=12:05:08pm0500'); + + expect(filter.date(noon, "EEE, MMM d, yyyy")). + toEqual('Fri, Sep 3, 2010'); + + expect(filter.date(noon, "EEEE, MMMMM dd, yyyy")). + toEqual('Friday, September 03, 2010'); }); it('should be able to parse ISO 8601 dates/times using', function() { -- cgit v1.2.3