* "Last workday of month" scheduling
@ 2010-10-15 7:00 Gustav Wikström
2010-10-15 13:39 ` Giovanni Ridolfi
0 siblings, 1 reply; 2+ messages in thread
From: Gustav Wikström @ 2010-10-15 7:00 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 230 bytes --]
Hello!
I have one modest question to ask:
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?
Best Regards
Gustav Wikström
[-- Attachment #1.2: Type: text/html, Size: 900 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: "Last workday of month" scheduling
2010-10-15 7:00 "Last workday of month" scheduling Gustav Wikström
@ 2010-10-15 13:39 ` Giovanni Ridolfi
0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Ridolfi @ 2010-10-15 13:39 UTC (permalink / raw)
To: Gustav Wikström; +Cc: emacs-orgmode
Gustav Wikström <gustav.erik@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-15 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-15 7:00 "Last workday of month" scheduling Gustav Wikström
2010-10-15 13:39 ` Giovanni Ridolfi
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).