I can make this example example work. What I need is to set the weekday from a cell in column "weekday".
I have tried this:
if(type=='PD'){
var recurrence = CalendarApp.newRecurrence().addWeeklyRule().onlyOnWeekday(weekday);
event.setRecurrence(recurrence, tstart, tstop);
}else
...where weekday refers to column "weekday".
What am I doing wrong in my own version?
I could confirm that from your script and shared Spreadsheet, the values of
NewWeekdayareWEDNESDAYandMONDAYof the string type. In this case, how about the following modification?From:
To:
References:
If I misunderstood your question and this was not the result you want, I apologize.
Added:
tstopas "until".For this, how about the following modification?
From:
To: