Applescript Day of week instead of date?

I’d like to be able to select multiple tasks, type in a three-letter day of week abbreviation, and have the script assign that day to defer and due on all the items.

I have a script that does this with number of days, but I’m tired of mentally calculating the number of days each time I use it. I just want to tell it to “bump these to Friday” and have them all moved to Friday.

Do I have to get into calculating days of week, or is there a way in AppleScript to use the abbreviation strings?

Thanks in advance for your help.

You may find this snippet useful …

on nextWeekday(wd)
set today to current date
set twd to weekday of today
if twd is wd then
	set d to 7
else
	set d to (7 + wd - twd) mod 7
end if
return today + (d * days)
end nextWeekday

I have it from … somewhere on the Web. I use it to set my review cycles, as noted here.


JJW

This does look useful. Thanks.