Skip to content

Commit 7239538

Browse files
committed
Merge pull request mootools#1248 from SergioCrisostomo/spec-fix-DateUTC-IE
Use Date.UTC() instead of Browser.ie
2 parents ec4cb4d + 39e81bf commit 7239538

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Specs/Types/Date.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ describe('Date', function(){
282282

283283
it('should return the time zone of a Date instance', function(){
284284
var d = new Date(Date.UTC(2000, 0, 1, 1, 1, 1));
285-
if (global['Browser'] && Browser.ie) expect(d.get('timezone')).toEqual(new Date(Date.UTC()).get('timezone'));
285+
if (Date.UTC()) expect(d.get('timezone')).toEqual(new Date(Date.UTC()).get('timezone'));
286286
else expect(d.get('timezone')).toEqual('GMT');
287287
});
288288

@@ -459,7 +459,7 @@ describe('Date', function(){
459459
expect(d.format('%Y')).toEqual('1997');
460460
});
461461
it('should format the timezone', function(){
462-
if (global['Browser'] && Browser.ie) expect(d.format('%Z')).toEqual(new Date(Date.UTC()).get('timezone'));
462+
if (Date.UTC()) expect(d.format('%Z')).toEqual(new Date(Date.UTC()).get('timezone'));
463463
else expect(d.format('%Z')).toEqual('GMT');
464464
});
465465
it('should only replace the % when it is followd by a single a-z', function(){
@@ -484,7 +484,7 @@ describe('Date', function(){
484484

485485
it('should support the rfc822 shortcut', function(){
486486
expect(d.format('rfc822')).toEqual(d.format('%a') + ', ' + d.format('%d') + ' ' + d.format('%b') + ' ' + d.format('%Y') + ' ' + d.format('%H') + ':' + d.format('%M') + ':' + d.format('%S') + ' ' + d.format('%Z'));
487-
if (global['Browser'] && Browser.ie) expect(d.format('rfc822')).toEqual('Thu, 20 Nov 1997 01:02:03 ' + new Date(Date.UTC()).get('timezone'));
487+
if (Date.UTC()) expect(d.format('rfc822')).toEqual('Thu, 20 Nov 1997 01:02:03 ' + new Date(Date.UTC()).get('timezone'));
488488
else expect(d.format('rfc822')).toEqual('Thu, 20 Nov 1997 01:02:03 GMT');
489489
});
490490

0 commit comments

Comments
 (0)