aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngMock
diff options
context:
space:
mode:
authorMaxim Grach2013-02-01 11:41:28 +0600
committerIgor Minar2013-02-07 02:28:33 -0800
commitdf744f3af46fc227a934f16cb63c7a6038e7133b (patch)
tree01ffb1ec1048745c2dbb5f8f66f2c1c5326232ff /src/ngMock
parent8155c3a29ea0eb14806913b8ac08ba7727e1969c (diff)
downloadangular.js-df744f3af46fc227a934f16cb63c7a6038e7133b.tar.bz2
feat(dateFilter): add `[.,]sss` formatter for milliseconds
Also Implement getMilliseconds() method of TzDate and add test for this in ngMock.
Diffstat (limited to 'src/ngMock')
-rw-r--r--src/ngMock/angular-mocks.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js
index c0b499ef..3bd93a40 100644
--- a/src/ngMock/angular-mocks.js
+++ b/src/ngMock/angular-mocks.js
@@ -456,6 +456,7 @@ angular.mock.$LogProvider = function() {
* newYearInBratislava.getDate() => 1;
* newYearInBratislava.getHours() => 0;
* newYearInBratislava.getMinutes() => 0;
+ * newYearInBratislava.getSeconds() => 0;
* </pre>
*
*/
@@ -512,6 +513,10 @@ angular.mock.$LogProvider = function() {
return self.date.getSeconds();
};
+ self.getMilliseconds = function() {
+ return self.date.getMilliseconds();
+ };
+
self.getTimezoneOffset = function() {
return offset * 60;
};
@@ -562,7 +567,7 @@ angular.mock.$LogProvider = function() {
}
//hide all methods not implemented in this mock that the Date prototype exposes
- var unimplementedMethods = ['getMilliseconds', 'getUTCDay',
+ var unimplementedMethods = ['getUTCDay',
'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',