Skip to content

Instantly share code, notes, and snippets.

@carlos-sanchez
Created November 14, 2013 15:04
Show Gist options
  • Save carlos-sanchez/7468319 to your computer and use it in GitHub Desktop.
Save carlos-sanchez/7468319 to your computer and use it in GitHub Desktop.
Current Year.
<span id="current-year"></span>
<script type="text/javascript">
$(function(){
var date_object = new Date();
var year = date_object.getYear();
if(year < 2000) { year = year + 1900; }
$('#current-year').html(year);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment