0

Reference to 31.10.1 The Diary File

It provides example as

 April 15, 2020 Income tax due.

M-x calendar to the date of Apr 15, 2020 and strike d, it prompts a buffer as

2020-04-15 Wednesday
=====================
ISO date: Day 3 of week 16 of 2020
Last Quarter Moon 7:01am (CST)
Sunrise 5:23am
Sunset 6:30pm
 2020 Income tax due.

It seems to work properly, but if I check the date of Apr 15, 2021

2021-04-15 Thurday
=====================
ISO date: Day 4 of week 15 of 2021
Sunrise 5:24am
Sunset 6:29pm
 2020 Income tax due.

The "Income tax due" appeared again and it actually displayed every year on the date Apr 15.

What's the problem?

Org mode version 9.4 in Emacs 26.3 with Ubuntu 19.10

1
  • Cannot reproduce it (although I'm not sure how you produce the ISO date, sunrise and sunset) stuff. It looks as if the 2020 is taken as part of the message, not as part of the date. I would delete it and retype it carefully, just in case there is some non-printing character that confuses the diary. – NickD May 4 at 16:38
2

EDIT (added 2021-05-04): either the question was changed (which I cannot see from the edit history) or I misunderstood the question: instead of the entry being tied to a single year, but incorrectly appearing in every year, I think I read it as that it should appear every year. Apologies for the misreading.

As mentioned in the comment, I cannot reproduce the behavior that the OP observes, but the the fact that the 2020 appears as part of the message makes me think that the diary is getting confused because of some artifact (perhaps a non-printing character) in the diary file. Make sure that the entry is:

April 15, 2020 Income tax due.

C-x v diary-file tells you:

...
The file’s entries are lines beginning with any of the forms
specified by the variable ‘diary-date-forms’, which by default
uses the forms of ‘diary-american-date-forms’:

            MONTH/DAY
            MONTH/DAY/YEAR
            MONTHNAME DAY
            MONTHNAME DAY, YEAR
            DAYNAME
...

So just do

April 15 Tax day

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.