emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Ben Finney <ben+emacs@benfinney.id.au>
Cc: emacs-orgmode@gnu.org
Subject: Re: Monthly events based on count of specific weekdays
Date: Sun, 08 Nov 2009 06:58:29 -0500	[thread overview]
Message-ID: <m27hu1cjoa.fsf@fastmail.fm> (raw)
In-Reply-To: <87ws214lpo.fsf@benfinney.id.au> (Ben Finney's message of "Sun, 08 Nov 2009 16:41:39 +1100")

Ben Finney <ben+emacs@benfinney.id.au> writes:

> Howdy all,
>
> How can I set an event in Org mode that repeats every month, on a
> specific weekday, on a week counted from the start of the month?
>
> For example:
>
>   * every month on the first Tuesday of the month.
>   * every month on the third Sunday of the month.
>   * every first and third Wednesday of the month.
>
> Taking “first Tuesday of the month”, if I set it this month on
> <2009-11-15 Sun>, it should next repeat on <2009-12-20 Sun> and so on
> each month. These do not do what I want:
>
>   * <2009-11-15 Sun +1m>
>   * <2009-11-08 Sun ++1m>
>   * <2009-11-08 Sun .+1m>
>
>     Each of these next repeats on <2009-12-15 Tue>, the wrong date.
>
> How can I specify a repeating event to Org mode that achieves what I
> described above?

From the org manual:

,----[8.1. Timestamps, deadlines, and scheduling]
| DIARY-STYLE SEXP ENTRIES
|      For more complex date specifications, Org mode supports using the
|      special sexp diary entries implemented in the Emacs calendar/diary
|      package.  For example
| 
|           * The nerd meeting on every 2nd Thursday of the month
|             <%%(diary-float t 4 2)>
`----

Here's how to schedule the examples above:

* First Tuesday of month
<%%(diary-float t 2 1)>

* Third Sunday of month
<%%(diary-float t 0 3)>

* First or third Wednesday of month
<%%(or (diary-float t 3 1) (diary-float t 3 3))>

Best,
Matt

  reply	other threads:[~2009-11-08 11:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08  5:41 Monthly events based on count of specific weekdays Ben Finney
2009-11-08 11:58 ` Matt Lundin [this message]
2009-11-08 12:23   ` Ben Finney
2009-11-08 12:59     ` Matt Lundin
2009-11-08 20:52       ` Ben Finney
2009-11-09 10:13         ` Giovanni Ridolfi
2009-11-09 10:34           ` Ben Finney
2009-11-19 22:43         ` Feature request: Periodic events based on count of specific weekdays (was: Monthly events based on count of specific weekdays) Ben Finney
2009-11-20  7:37           ` Carsten Dominik
2009-11-20 22:56             ` Feature request: Periodic events based on count of specific weekdays Ben Finney
2009-11-21  3:31               ` Samuel Wales
2009-11-21  7:08               ` Carsten Dominik
2009-11-21 21:06               ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m27hu1cjoa.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=ben+emacs@benfinney.id.au \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).