Last active
April 18, 2019 22:20
-
-
Save jfolds/6406ec3552e521baaf71e59ef7ca241f 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
const timestamp = 1555624965730; | |
const timeCurrent = new Date().getTime(); | |
const timeElapsed = Math.floor((tC - timestamp) / 1000 / 60); //get time elapsed | |
const timeSince = (tE > 60) ? Math.floor((tE * 60) / 3600) + ' hours ago' : tE + ' minutes ago'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment