如何在本月的最后一个工作日为TODO设定截止日期?
答案 0 :(得分:1)
我很确定这个功能可以做到。
(defun last-working-day-deadline ()
(interactive)
(let* ((date (calendar-current-date))
(day (calendar-extract-day date))
(month (calendar-extract-month date))
(year (calendar-extract-year date))
(lastday (calendar-last-day-of-month month year)))
;; workdays have "names" of 1 2 3 4 or 5
(while (not (memq (calendar-day-of-week (list month lastday year)) '(1 2 3 4 5)))
(decf lastday))
(org-deadline nil (format "%s-%s-%s" year month lastday))))