Created
July 28, 2016 10:52
-
-
Save AshikNesin/da2a9542edea91077c6126c4004dd581 to your computer and use it in GitHub Desktop.
[JS] Implicit Convert HH:MM:SS to Date Object
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
function toDateWithOutTimeZone(date) { | |
let tempTime = date.split(":"); | |
let dt = new Date(); | |
dt.setHours(tempTime[0]); | |
dt.setMinutes(tempTime[1]); | |
dt.setSeconds(tempTime[2]); | |
return dt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment