Years Since Today
jQuery: calculate the years since today
by Jon Fuller
HTML
1979 is <span id="sinceDate">35+</span> years today.
CSS
#sinceDate {font-weight: bold;}
JavaScript
function yearsSince() {
var d = new Date();
var sinceThen = d.getFullYear()-1979;
$("#sinceDate").html(sinceThen);
}
$(document).ready(function() {
yearsSince();
});