Last active
January 30, 2019 12:07
-
-
Save kylekatarnls/623db251673a7916e7978bdbbc50fd5e to your computer and use it in GitHub Desktop.
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 dateString = '2018-01-25'; // can be numbers concat: year + '-' + month + '-' + day | |
var timeString = '12:30'; | |
var date = new Date(dateString + 'T' + timeString); // use the `T` separator for cross-browser compatibility |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment