Skip to content

Instantly share code, notes, and snippets.

@bryanforbes
Created March 6, 2012 17:18
Show Gist options
  • Save bryanforbes/1987579 to your computer and use it in GitHub Desktop.
Save bryanforbes/1987579 to your computer and use it in GitHub Desktop.
Neat Chrome 17 on Windows bug
// Confirmed on Chrome 17 on Windows
// Once the first TypeError occurs, no further Dates can be created and manipulated
var i = 0, d;
while(true){
++i;
try{
d = new Date();
d.setHours(0,0,0,0);
}catch(e){
console.log(i);
console.log(e);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment