Skip to content

Instantly share code, notes, and snippets.

@fbuchinger
Created October 23, 2011 15:29
Show Gist options
  • Save fbuchinger/1307476 to your computer and use it in GitHub Desktop.
Save fbuchinger/1307476 to your computer and use it in GitHub Desktop.
datefromarray
dateFromArray = (dateArr) ->
[year, month, day , hour, minute, second, millisecond] = dateArr
(new Date (year, month || 0, day || 0, minute || 0, second || 0, millisecond || 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment