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 /src/angular-mocks.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 'src/angular-mocks.js')
| -rw-r--r-- | src/angular-mocks.js | 5 | 
1 files changed, 4 insertions, 1 deletions
| diff --git a/src/angular-mocks.js b/src/angular-mocks.js index 0f806917..887d3520 100644 --- a/src/angular-mocks.js +++ b/src/angular-mocks.js @@ -385,9 +385,12 @@ function TzDate(offset, timestamp) {      return this.origDate.getUTCSeconds();    }; +  this.getDay = function() { +    return this.origDate.getDay(); +  };    //hide all methods not implemented in this mock that the Date prototype exposes -  var unimplementedMethods = ['getDay', 'getMilliseconds', 'getTime', 'getUTCDay', +  var unimplementedMethods = ['getMilliseconds', 'getTime', 'getUTCDay',        'getUTCMilliseconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',        'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',        'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', | 
