From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: reingold@emr.cs.iit.edu (Edward M. Reingold) Newsgroups: gmane.emacs.help Subject: Re: Diary question Date: 27 Mar 2007 08:26:20 -0500 Organization: Usenet @ UIUC - http://www.killfile.org/usenet/ Message-ID: <85d52uddhf.fsf@emr.cs.iit.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175002705 2157 80.91.229.12 (27 Mar 2007 13:38:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2007 13:38:25 +0000 (UTC) Cc: steve.stevebrown@gmail.com To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 27 15:38:14 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HWBsM-0007af-Gi for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2007 15:38:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWBui-0003aa-9W for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2007 08:40:40 -0500 Original-Path: shelby.stanford.edu!newshub.stanford.edu!news.ks.uiuc.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: emr.cs.iit.edu Original-X-Trace: news.ks.uiuc.edu 1175001981 29828 216.47.142.126 (27 Mar 2007 13:26:21 GMT) Original-X-Complaints-To: news+abuse@ks.uiuc.edu Original-NNTP-Posting-Date: Tue, 27 Mar 2007 13:26:21 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:146617 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42221 Archived-At: >>>>> "SB" == Steve Brown 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.