Skip to content

Instantly share code, notes, and snippets.

@dandye
Created June 22, 2017 03:53
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 dandye/8c65f398e34d902ae0c32a94d3990771 to your computer and use it in GitHub Desktop.
Save dandye/8c65f398e34d902ae0c32a94d3990771 to your computer and use it in GitHub Desktop.
function splitDate(date) {
var rdate = /(\d+).(\d+).(\d+)/
return rdate.exec(date)
}
var [ , year, month, day] = splitDate('2015-11-06')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment