Skip to content

Instantly share code, notes, and snippets.

@johnnaegle
Created November 11, 2014 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnnaegle/6754dc25b2bbe9f88faf to your computer and use it in GitHub Desktop.
Save johnnaegle/6754dc25b2bbe9f88faf to your computer and use it in GitHub Desktop.
IE9 JS bug
var data = [2013,10,12,60];
var date = data.slice(0,3);
var payload = data.slice(3);
var result = [new Date(date[0], date[1], date[2])];
if (payload.length > 0) {
for (item in payload) {
result.push(payload[item]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment