Created
March 20, 2017 05:35
-
-
Save muhammadghazali/5bd153d1ae62cbc0389a4df043b09aa0 to your computer and use it in GitHub Desktop.
Converting the Stripe epoch timestamp to ISO 8601
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
export function secondsToISOString(seconds) { | |
const date = new Date(seconds * 1000); | |
return date.toISOString(); | |
} |
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
export function secondsToISOString(seconds) { | |
return date.toISOString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!