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
This commit is contained in:
Di Peng
2011-06-22 12:33:31 -07:00
parent 9ec45ad5c4
commit b5a510a343
3 changed files with 52 additions and 17 deletions

View File

@@ -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() {