diff options
| author | Di Peng | 2011-06-22 12:33:31 -0700 |
|---|---|---|
| committer | Di Peng | 2011-06-23 12:06:46 -0700 |
| commit | b5a510a343270f499cbb8b8a9ac3a3309e9b7ce2 (patch) | |
| tree | 2dc4ed51879300c74a4227e9d5a8260013d75e08 /test/FiltersSpec.js | |
| parent | 9ec45ad5c45791c81d4d1909ea1abceedc5ed3e9 (diff) | |
| download | angular.js-b5a510a343270f499cbb8b8a9ac3a3309e9b7ce2.tar.bz2 | |
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
Diffstat (limited to 'test/FiltersSpec.js')
| -rw-r--r-- | test/FiltersSpec.js | 6 |
1 files changed, 6 insertions, 0 deletions
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() { |
