function getjaar(d) {
  var y = d.getYear();
  if (y < 1000) y += 1900;
  return y;
}
vandaag=new Date();
document.write(getjaar(vandaag));