Created
April 2, 2016 11:12
-
-
Save hsleonis/3c5dddc7922c9f00e840da176d4ea832 to your computer and use it in GitHub Desktop.
Convert date format
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
| /** | |
| * Date format received from Yahoo: 2016-04-03T19:00:00+05:30 | |
| * Date format needed: Mon, 03 April 2016 | |
| * | |
| * Ref.: http://www.w3schools.com/js/js_dates.asp | |
| */ | |
| var d = new Date('2016-04-03T19:00:00+05:30'); | |
| document.write(d.toUTCString().slice(0,16)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment