var czas = new Date();
var roczek = czas.getYear();

if (roczek < 1900) {
	roczek = roczek + 1900;
}

if (roczek < rok) {
	roczek = rok;
}

if (roczek == rok) {
	document.write(rok);
}
else {
	document.write(rok + '-' + roczek);
}

