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