Created
November 14, 2013 15:04
-
-
Save carlos-sanchez/7468319 to your computer and use it in GitHub Desktop.
Current Year.
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
<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