makalet,
<script>
var birthday = '07.09.2005';
var dd = birthday.split(".");
var mydate = new Date(dd[2],dd[1]-1,dd[0]);
var date = new Date();
date.setHours(0, 0, 0);
for (var i=0; ; i+=10) {
mydate.setYear(+dd[2]+i);
var test = Math.round((mydate - date) / 864E5);
if(test > 0) {document.write(i +" лет юбилей через " +test + " дней<br>"); break }
}
</script>