I don't find the mistake, what am I doing wrong? It has to be a stupid and very easy reason...
When calling this function without a parameter the current year should be used in the following code but I get an 'undefined' error
function get_ostersonntag(year){
if ((year == "") || (year == null)){
year= new Date();
year = year.getFullYear;
}
console.log(year)
}