>>>>> Rohan Nicholls <[EMAIL PROTECTED]> writes:

> Hey all,
> How can I setup in the cyclic file a task for the last day of month?

> Actually the last Friday of the month would be better, but I have been
> reading the info file for diary entries and can find nothing about
> this.

> The worry is that if I set it for the 31 of the month that all the
> months that are shorter will not catch this.  I was thinking that a
> handy thing would be something like:

> -1/*

> for the definition.  Does anyone know if this format is supported or
> whether the date format catches the last day of the month and adds the
> task regardless of whether the month has 28, 29, 30 days.

For last day of the month, you could have something like:

(defun calendar-last-day-of-month-p (date &optional mark)
  (when (= 1 
           (extract-calendar-day
            (calendar-gregorian-from-absolute 
             (1+ (calendar-absolute-from-gregorian date)))))
    (cons mark entry)))

And then

%%(calendar-last-day-of-month-p date) #B _ Your task

For the last Friday of the month, you can use diary-float. I think it
would be something like:

%%(diary-float t 5 -1) #B _ Your task

Regards,
-- 
Dr Jim Ottaway
Research Officer: Translating Neurobiological Research
BIOS Centre for Bioscience, Biomedicine, Biotechnology and Society
Room V1100, Tower 2
London School of Economics and Political Science
Telephone: +44 (0)20 7852 3688

_______________________________________________
Planner-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/planner-el-discuss

Reply via email to