Last active
December 11, 2015 14:28
-
-
Save mykecameron/4614318 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
<% # assuming the times are stored in @time1 %> | |
<script> | |
$(document).ready(function(){ | |
date = new Date(<%= @time1.iso8601 %>); | |
$('.my_timezone_container').html(date.toString()); | |
}); | |
// or maybe use moment | |
$(document).ready(function(){ | |
date = moment(<%= @time1.iso8601 %>); | |
$('.my_timezone_container').html(date.format('mm/dd/yyyy hh:mm'); | |
}); | |
</script> | |
<div class="my_timezone_container"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment