Tags

,

HTML

copyright 2010-<span id="cur-year"></span>

JS

var now = new Date();
var thecopyrightYear = now.getYear();
if (thecopyrightYear < 1900) {thecopyrightYear = thecopyrightYear + 1900; }
$("#cur-year").html(thecopyrightYear);

Click Here To See Working Example

Advertisements