@@ -516,15 +516,16 @@ function TzDate(offset, timestamp) {
516
516
} ;
517
517
518
518
//hide all methods not implemented in this mock that the Date prototype exposes
519
- var unimplementedMethods = [ 'getMilliseconds' , 'getTime' , 'getUTCDay' ,
519
+ var self = this ,
520
+ unimplementedMethods = [ 'getMilliseconds' , 'getUTCDay' ,
520
521
'getUTCMilliseconds' , 'getYear' , 'setDate' , 'setFullYear' , 'setHours' , 'setMilliseconds' ,
521
522
'setMinutes' , 'setMonth' , 'setSeconds' , 'setTime' , 'setUTCDate' , 'setUTCFullYear' ,
522
523
'setUTCHours' , 'setUTCMilliseconds' , 'setUTCMinutes' , 'setUTCMonth' , 'setUTCSeconds' ,
523
524
'setYear' , 'toDateString' , 'toJSON' , 'toGMTString' , 'toLocaleFormat' , 'toLocaleString' ,
524
525
'toLocaleTimeString' , 'toSource' , 'toString' , 'toTimeString' , 'toUTCString' , 'valueOf' ] ;
525
526
526
527
angular . forEach ( unimplementedMethods , function ( methodName ) {
527
- this [ methodName ] = function ( ) {
528
+ self [ methodName ] = function ( ) {
528
529
throw {
529
530
name : "MethodNotImplemented" ,
530
531
message : "Method '" + methodName + "' is not implemented in the TzDate mock"
0 commit comments