get every friday 13th of any year javascript code example
Example: display month friday 13th javascript year
function numberOfFridaythe13thsIn(jahr) {
var counter = 0;
for (i = 1; i <= 12; i++) {
var d = new Date(i + "/13/" + jahr);
if (d.getDay() == 5) {
counter++;
}
}
return counter;
}