Created
April 12, 2018 09:21
-
-
Save cyio/2691b08d8ec71f018344ab0530a92726 to your computer and use it in GitHub Desktop.
parse date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const [all, year, month, day] = /([0-9]*)\-([0-9]*)\-([0-9]*)/.exec('2018-04-03') | |
console.log(all, year, month, day) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment