Created
January 28, 2019 14:22
-
-
Save kylekatarnls/1642e96678e8b782bd9e6d93816669d8 to your computer and use it in GitHub Desktop.
This file contains 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
dateString = '2018-05-12T23:16:46.123456Z'; // get from your PHP server (JSON API, data-* attribute, etc.) | |
date = new Date(dateString); | |
alert(date.toLocaleString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment