1 function numberOfFridaythe13thsIn(jahr) {
2 var counter = 0;
3 for (i = 1; i <= 12; i++) {
4 var d = new Date(i + "/13/" + jahr);
5 if (d.getDay() == 5) {
6 counter++;
7 }
8 }
9 return counter;
10
11 }
12