I wanted to use Emacs Calendar and Diary to mark last non holiday day in each month as a reminder to send invoice. Regular date format can't be that specific. Diary has special functions that helps with marking abstract dates but as far as my research goes It can't mark last non holiday day in month.

No hope is lost when you can write your own code. First I read very end of "the Calendar and the Diary" info page where I found secret knowledge.

Then I wrote elisp expression inside diary file:

Code takes last day of given month and check if it's not a weekend day. If it is then go back by one day and check again. Repeat until you encounter regular day. Then check if given "date" match that day. If so then mark date using "error" face with "Invoice" description.

Lesson for today?

Read documentations and live to code another day!

EOF

Proxied content from gemini://tilde.pink/~irek/log/210619.gmi (external content)

Gemini request details:

Original URL
gemini://tilde.pink/~irek/log/210619.gmi
Status code
Success
Meta
text/gemini;lang=en
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.