Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Created July 2, 2020 07:10
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 virtualhobbit/a7f5c30a425ce806518281db2a889cd0 to your computer and use it in GitHub Desktop.
Save virtualhobbit/a7f5c30a425ce806518281db2a889cd0 to your computer and use it in GitHub Desktop.
var dateStr;
var chars = [":","-"];
for (var i = 0; i < chars.length;i++) {
while (inDate.indexOf(chars[i]) !== -1) {
inDate = inDate.replace(chars[i],"");
}
}
dateStr = inDate.split(".")[0] + "Z";
return dateStr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment