Created
July 21, 2016 05:04
-
-
Save CaptainYarb/8f40c2868c5eac796c21c2ace5bac381 to your computer and use it in GitHub Desktop.
Setting Dates in Javascript - Test 2
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
var pattern = new RegExp('([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2})\.([0-9]{1,2})'); | |
var parts = dates[i].match(pattern); | |
new Date(parts[1], parts[2], parts[3], parts[4], parts[5], parts[6]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment