Skip to content

Instantly share code, notes, and snippets.

@LouisWhit
LouisWhit / Mobile Current Year
Created June 11, 2013 22:49
Mobile friendly current year. This script plays nice with Jquery Mobile 1.31
<span class="year"></span>.
<script type="text/javascript">
$(".year").text((new Date).getFullYear());
</script>
@LouisWhit
LouisWhit / Get Current Year
Created June 11, 2013 22:23
Lightweight get current year script.
<script type="text/javascript">
var d = new Date();
var y = d.getFullYear();
document.write(y);
</script>