Created
June 27, 2014 13:48
-
-
Save mundry/4f00b0deebd301d92868 to your computer and use it in GitHub Desktop.
Moment.js setup
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
<script src="moment.js"></script> | |
<script src="de.js"></script> | |
<script> | |
(function(){ | |
var timestamp = document.querySelector("[data-timestamp]"); | |
timestamp.innerHTML = moment.unix(timestamp.getAttribute("data-timestamp")).format("dddd, Do MMMM YYYY, H:mm:ss"); | |
}()) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment