Gustav Wikström <gustav.e...@gmail.com> writes: Hi Gustav, > Is there a way in Org-mode to schedule a task so it appears the last > workday (i.e. not Saturday or Sunday) of the month, each month?
Yes, with a sexp diary entry ** a task SCHEDULED: <%%(diary-float [some-function])> To find how [some-function] could be written, you can be inspired by the one in Emacs manual: 38.15.9 Sexp Entries and the Fancy Diary Display Suppose you get paid on the 21st of the month if it is a weekday, and on the Friday before if the 21st is on a weekend. Here is how to write a sexp diary entry that matches those dates: &%%(let ((dayname (calendar-day-of-week date)) (day (cadr date))) (or (and (= day 21) (memq dayname '(1 2 3 4 5))) (and (memq day '(19 20)) (= dayname 5))) ) Pay check deposited Giovanni _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode