@@ -523,15 +523,16 @@ function TzDate(offset, timestamp) {
523523 } ;
524524
525525 //hide all methods not implemented in this mock that the Date prototype exposes
526- var unimplementedMethods = [ 'getMilliseconds' , 'getTime' , 'getUTCDay' ,
526+ var self = this ,
527+ unimplementedMethods = [ 'getMilliseconds' , 'getUTCDay' ,
527528 'getUTCMilliseconds' , 'getYear' , 'setDate' , 'setFullYear' , 'setHours' , 'setMilliseconds' ,
528529 'setMinutes' , 'setMonth' , 'setSeconds' , 'setTime' , 'setUTCDate' , 'setUTCFullYear' ,
529530 'setUTCHours' , 'setUTCMilliseconds' , 'setUTCMinutes' , 'setUTCMonth' , 'setUTCSeconds' ,
530531 'setYear' , 'toDateString' , 'toJSON' , 'toGMTString' , 'toLocaleFormat' , 'toLocaleString' ,
531532 'toLocaleTimeString' , 'toSource' , 'toString' , 'toTimeString' , 'toUTCString' , 'valueOf' ] ;
532533
533534 angular . forEach ( unimplementedMethods , function ( methodName ) {
534- this [ methodName ] = function ( ) {
535+ self [ methodName ] = function ( ) {
535536 throw {
536537 name : "MethodNotImplemented" ,
537538 message : "Method '" + methodName + "' is not implemented in the TzDate mock"
0 commit comments