function thirdThursdaysArray(year){ var thirdThursdaysAMonthAYear = []; var daysAMonth = [31,28,31,30,31,30,31,31,30,31,30,31]; for(var i=0;i< daysAMonth.length;i++){ var thirdThursdaysAMonth = []; for(var j=0;j<daysAMonth[i];j++){ var month = i; var day = j+1; if(new Date(year,month,day).getDay() == 4){ thirdThursdaysAMonth.push(new Date(year,month,day)); } } thirdThursdaysAMonthAYear.push(thirdThursdaysAMonth[2]); } return thirdThursdaysAMonthAYear; }
maandag 9 november 2020
Third thursdays a month a year with #GoogleAppsScript
I am organising - I would like to organise - something every third thursday a month a year. So how to collect the dates of all those third thursdays.
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten