From: reingold@emr.cs.iit.edu (Edward M. Reingold)
Cc: Raimund.Kohl@freenet.de
Subject: Re: diary entry to count
Date: 09 Sep 2002 19:56:09 -0500 [thread overview]
Message-ID: <85sn0iwtli.fsf@emr.cs.iit.edu> (raw)
In-Reply-To: mailman.1031608628.2831.help-gnu-emacs@gnu.org
>>>>> "RK" == Raimund Kohl <Raimund.Kohl@freenet.de> writes:
RK> that it would have been. I am looking for calender/diary telling me
RK> (e.g.)
RK> 1st of Sept - Discourse No 1
RK> or later
RK> 1st of Nov - Discourse No 3
Oh--I misunderstood. use
%%(diary-first-of-month 20 9 2002) Discourse No %d
for 20 months starting October 1, 2002, where you have the following in your
.emacs
(defun diary-first-of-month (n month year)
"Cycle diary entry.
Entry applies on the first of the month for N months starting MONTH, DAY, YEAR.
ENTRY can contain `%d' or `%d%s'; the %d will be replaced by the number of
months since MONTH 1, YEAR and the %s will be replaced by the ordinal ending
of that number (that is, `st', `nd', `rd' or `th', as appropriate."
(let* ((cycle (+ 1 (* 12 (- (extract-calendar-year date) year))
(- (extract-calendar-month date) month))))
(if (and (= (extract-calendar-day date) 1)
(< 0 cycle)
(<= cycle n))
(format entry cycle (diary-ordinal-suffix cycle)))))
--
Professor Edward M. Reingold Email: reingold@iit.edu
Chairman, Department of Computer Science Voice: (312) 567-3309
Illinois Institute of Technology Assistant: (312) 567-5152
Stuart Building Fax: (312) 567-5067
10 West 31st Street, Suite 236
Chicago, IL 60616-3729 U.S.A.
next parent reply other threads:[~2002-09-10 0:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1031608628.2831.help-gnu-emacs@gnu.org>
2002-09-10 0:56 ` Edward M. Reingold [this message]
[not found] <851y8383gj.fsf@emr.cs.iit.edu>
2002-09-09 21:52 ` diary entry to count Raimund.Kohl
2002-09-06 22:47 Raimund.Kohl
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85sn0iwtli.fsf@emr.cs.iit.edu \
--to=reingold@emr.cs.iit.edu \
--cc=Raimund.Kohl@freenet.de \
/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.
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).