From: reingold@emr.cs.iit.edu (Edward M. Reingold)
To: help-gnu-emacs@gnu.org
Cc: steve.stevebrown@gmail.com
Subject: Re: Diary question
Date: 27 Mar 2007 08:26:20 -0500 [thread overview]
Message-ID: <85d52uddhf.fsf@emr.cs.iit.edu> (raw)
In-Reply-To: mailman.1494.1175000724.7795.help-gnu-emacs@gnu.org
>>>>> "SB" == Steve Brown <steve.stevebrown@gmail.com> writes:
SB> %%(diary-float t 4 -1)
SB> and alls well, but I get paid on the last working day, and I'd like to
SB> mark it. I would guess that I could change the 4 for a list, but it
SB> didn't work, and now I'm lost.
For example:
&%%(let* ((month (extract-calendar-month date))
(day (extract-calendar-day date))
(year (extract-calendar-year date))
(last (calendar-last-day-of-month month year))
(dayname (calendar-day-of-week date)))
(or (and (= day last) (memq dayname '(1 2 3 4 5)))
(and (or (= day (1- last)) (= day (- last 2)))
(= dayname 5)))) Payday!
Or, if it's the first work day of the month:
&%%(let ((dayname (calendar-day-of-week date))
(day (car (cdr date))))
(or (and (= day 1) (memq dayname '(1 2 3 4 5)))
(and (memq day '(2 3)) (= dayname 1)))) Rent due
--
Professor Edward M. Reingold Email: reingold@iit.edu
Department of Computer Science Voice: (312) 567-3309
Illinois Institute of Technology Fax: (312) 567-5067
Stuart Building, 228F
10 West 31st Street
Chicago, IL 60616-3729 U.S.A.
next parent reply other threads:[~2007-03-27 13:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1494.1175000724.7795.help-gnu-emacs@gnu.org>
2007-03-27 13:26 ` Edward M. Reingold [this message]
2007-03-27 19:37 ` Diary question Steve Brown
2007-03-25 21:24 Steve Brown
[not found] <mailman.2883.1067617940.21628.help-gnu-emacs@gnu.org>
2003-11-04 17:00 ` diary question Edward M. Reingold
-- strict thread matches above, loose matches on Subject: below --
2003-10-31 16:23 Rudy Gevaert
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=85d52uddhf.fsf@emr.cs.iit.edu \
--to=reingold@emr.cs.iit.edu \
--cc=help-gnu-emacs@gnu.org \
--cc=steve.stevebrown@gmail.com \
/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).