aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular-mocks.js
diff options
context:
space:
mode:
authorDi Peng2011-06-22 12:33:31 -0700
committerDi Peng2011-06-23 12:06:46 -0700
commitb5a510a343270f499cbb8b8a9ac3a3309e9b7ce2 (patch)
tree2dc4ed51879300c74a4227e9d5a8260013d75e08 /src/angular-mocks.js
parent9ec45ad5c45791c81d4d1909ea1abceedc5ed3e9 (diff)
downloadangular.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.js5
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',