Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Arkivaren

macrumors Chihuahua
Original poster
Mar 13, 2025
6
3
The calendar cli app that I've been using since Jaguar to mimic a "what
happened today in history" functionality isn't working anymore in Sequoia ?
The program is seemingly still there in /usr/bin/calendar

But running it has no effect whatsoever (See below). Does anyone know what's up?

I was contemplating finding calendar in source code format and compile it but I don't
know where I would find said.

Excerpt of output from calendar running under Ventura (Intel):
Code:
14 Mar     Otte skoler i København er nu beslaglagt til tyske flygtninge, 1945
14 Mar     Luftalarm nr. 50 i København, 1943
14 Mar     Færgefarten på Store Bælt standset af ismasserne, 1942
14 Mar     Håndværksrådet oprettes, 1940
14 Mar     »Dagmarteatret« åbner som biograf, 1939
14 Mar     Tyske tropper marcherer ind i Mähren, ungarske tropper i Ukraine, 1939
14 Mar     Den tjekkiske ministerpræsident Hacha kaldes til Hitler, og det meddeles, at han har
             anmodet Hitler om at gøre landet til tysk protektorat, 1939

The result of running calendar on Sequoia (Apple silicon):
Code:
~ (9:40)
% calendar

~ (9:40)
%
 
Thanks, but there's no change in what I see when running calendar:

Code:
~ (13:35)
% calendar

~ (13:35)
% calendar -A 0

~ (13:35)
%
 
What do the contents of ~/calendar or ~/.calendar/calendar look like? Do you have a shell alias for the calendar command? Did you upgrade from a previous version of macOS? Since you're not using the -f flag and no error message is shown, it could just be that there isn't any match for today's date in your calendar file. Try running calendar -A 100 -B 100.

Possibly not related to your particular problem, but /usr/share/calendar doesn't exist on Sonoma, and I suspect it doesn't on Sequoia either. With calendar files copied from a Mojave machine, the calendar command works fine on Sonoma. This stackexchange thread shows how to get the missing files from FreeBSD.
 
  • Like
Reactions: Arkivaren
From the manual (man calendar in Sequoia 15.3.2)
"The calendar utility checks the current directory for a file named calendar and displays lines that fall into the specified date range."
 
From the manual (man calendar in Sequoia 15.3.2)
"The calendar utility checks the current directory for a file named calendar and displays lines that fall into the specified date range."
Not sure if that was directed at me, but yeah, I suppose it's possible that the OP has an unexpected calendar file somewhere other than in ~, but it seems unlikely. And if a calendar file couldn't be found, the OP would be seeing an error message. It's better, IMHO, to use a ~/.calendar directory, in which case the current working directory doesn't matter. It's still odd, and arguably a bug, that /usr/share/calendar is MIA on newer macOS releases.

EDIT: oops, it does matter if a file named "calendar" exists in the current directory. The search order is current directory, ~/.calendar, /usr/local/share/calendar, /usr/share/calendar. So, an empty "calendar" file in $PWD could lead to nothing being printed.
 
Last edited:
  • Like
Reactions: Arkivaren
I was contemplating finding calendar in source code format and compile it but I don't
know where I would find said.

The calendar program you have works fine, so don't bother with finding the source and compiling it. You're just missing the calendar files to read.

I just copied everything from my Linux computer at /usr/share/calendar into my ~/.calendar directory. I renamed calendar.all to just calendar. The calendar program read them just fine.
 
The calendar program you have works fine, so don't bother with finding the source and compiling it. You're just missing the calendar files to read.

I just copied everything from my Linux computer at /usr/share/calendar into my ~/.calendar directory. I renamed calendar.all to just calendar. The calendar program read them just fine.

I can provide a download link with a zip of all those files if you want.
 
Thanks everyone
I'm out the door in a minute so will have to get back to this later!
I don't believe the missing files in /usr/share/calendar is the problem [1]
and I suppose I should have made this clear from the get-go, but I
have customized files in ~/.calender (like you suspected Grumpus):

Code:
~/.calendar (7:47)
% ls
total 1,3M
-rw-r--r-- 1 klr staff 141K 2023-02-25 12:04 calendar.ekstra
-rw-r--r-- 1 klr staff 1,2M 2019-04-21 11:00 calendar.hernov
-rw-r--r-- 1 klr staff  174 2010-05-10 20:53 calendar

I don't have calendar aliased to anything.
Code:
calendar -A 0

The above is what starts calendar in my .zshrc.
(running calendar -A 100 -B 100 produces nothing btw)

I do have a function calling calendar however:

Code:
function kal() {
    if [[ $# == 0 ]]; then
        echo "Slår en dato op i calendar (dato.måned):"
        echo "Eks: kal 04.09"
    else
        calendar -A 0 -t "$1"
    fi
}

And for yesterday 13th of march (seeing that yesterday I accidentally gave
the output from today) this is (part) of the output from kal from my intel mbp running
Ventura= in other words it's not that there isn't anything for calendar to display on my
Mac mini:

Code:
13 Mar     Japanerne besætter Sumatras hovedstad, 1942
13 Mar     Odense Teater har première på Poul Knudsens dramatisering af Selma Lagerlöfs roman
    »Kejseren af Portugalien« med Carl Alstrup i hovedrollen, 1938
13 Mar     Den sidste jernbanebom i København forsvinder, 1933
13 Mar     Efter de tysknationales protest mod de nazistiske overgreb, voldshandlinger og
    forulempelser mod jøder rundt om i Tyskland, tager Hitler og Göring afstand fra disse overgreb,
    1933
13 Mar     Ved det tyske præsidentvalg får Hindenburg 18,7 mill stemmer, Hitler 11,3 mill stemmer,
    kommunisten Thälmann 5 mill og de tysknationales Düsterburg 2,6 mill stemmer. Da Hindenburg
    mangler168 000 stemmer i at opnå valg i første omgang, udsættes præsidentvalget til den 10.
    april, hvor Hindenburg endelig opnår at blive valgt, 1932
13 Mar     Ved lov gøres Statsradiofonien permanent, 1926
13 Mar     Socialdemokratiet får flertal i Københavns borgerrepræsentation ved kommunalvalget,
    1917

Anyway I'll look into the matter more thoroughly later when I get home.
Thanks again for your input.

[1]
Although I havn't actually tried populating /usr/share/calendar on Sequoia:
As mentioned calendar have plenty of data to work on in ~/.calendar, but it's certainly
worth a try (I have access to these files from my intel Ventura installation. Btw my intial
idea was to copy over calendar from the mbp (intel) to the mac mini (arm) but unsurprisingly
that doesn't quite work)
 
I copied the files from /usr/share/calendar on Ventura to /usr/local/share/calendar
on my cleanly installed Sequoia (I didn't want to mess with SIP). But it has no effect
whatsoever on calendar's processing of the ~/.calendar folder, which is still not happening.
I then tried copying the files from the ~/.calendar folder to the /usr/../calendar folder & also
tried editing the relevant files, with zero effect so to sum up: calendar (from Ventura and back)
used to give me a "today in history" consisting of my own calendar data read by the program
from ~/.calendar. On Sequoia what I get is
Nothing.
For my purposes calendar on Sequoia is broken.
 
Last edited:
Please cut-and-paste the following two lines into a Terminal window and tell us the result:
Code:
echo "$(date +%m/%d)\tTesting..." > test.calendar
/usr/bin/calendar -f test.calendar
The file test.calendar should be a well-formed calendar file, with today's date separated from the text by a tab character. I'm assuming you're using the zsh built-in echo command, which will expand '\t' to an actual tab character. Be sure to use the full path to the calendar command, as shown, to eliminate surprises due to aliases, shell functions and extraneous calendar commands in your $PATH. If 'Testing...' is printed, the calendar command is working.

Tabs are shown as '\t' in the calendar man page, but actual tab characters must separate dates from text in calendar files. If the tab characters aren't there, the calendar command will print nothing. If you're using vi to edit your calendar files, be sure to type :set noexpandtabto avoid tabs being expanded into space characters.
 
I copied the files from /usr/share/calendar on Ventura to /usr/local/share/calendar
on my cleanly installed Sequoia (I didn't want to mess with SIP). But it has no effect
whatsoever on calendar's processing of the ~/.calendar folder, which is still not happening.
I then tried copying the files from the ~/.calendar folder to the /usr/../calendar folder & also
tried editing the relevant files, with zero effect so to sum up: calendar (from Ventura and back)
used to give me a "today in history" consisting of my own calendar data read by the program
from ~/.calendar. On Sequoia what I get is
Nothing.
For my purposes calendar on Sequoia is broken.

Certainly "calendar -A 100 -B 100" gives me a ton of output.

The only thing I can think of is that there is something nonstandard in your calendar file that earlier versions of calendar forgave.

Looking forward to reading the result of the @Grumpus test.
 
Gentlemen!
My calender setup also works in Ubuntu 24.04 (WSL) so I think it'd be closer to the
truth to say that there's something nonstandard about how calendar works under Sequoia.
Anyway, the result of running the test is as expected:
Code:
[~] (07:00)
✓ % echo "$(date +%m/%d)\tTesting..." > test.calendar
/usr/bin/calendar -f test.calendar
16 Mar     Testing...

However if you change the date format like so → (date +%m.%d), which reproduces
the way dates are recorded in my files (see attached screen pic), and run the command
again, nothing happens. I did a quick find&replace to change the date seperator char in one of
the "source" files which didn't work but evenso all this would seem to indicate that calendar
under Sequoia chokes on my dates?!
 

Attachments

  • Skærmbillede 2025-03-16 kl. 07.40.35.png
    Skærmbillede 2025-03-16 kl. 07.40.35.png
    167.8 KB · Views: 15
Last edited:
  • Like
Reactions: rmadsen3
Looks like a bug or regression on Sonoma and Sequoia. I'm attaching a calendar file that I used for testing: run with calendar -t 16.3 -f separators.calendar. On Mojave and Monterey, every separator character works. On Sonoma, only slash and space work. Those are the only os versions I have available for testing at the moment, but I'm presuming that the problem started on Sonoma.
 

Attachments

  • separators.calendar.zip
    300 bytes · Views: 8
Although the Monterey calendar universal executable won't run on Sonoma, extracting the x86_64 binary and running it via Rosetta seems to work fine. I couldn't get the arm64e part to work.
Code:
$ ls
monterey-calendar   separators.calendar
$ chmod +x ./monterey-calendar
$ codesign --remove-signature ./monterey-calendar
$ lipo -extract x86_64 -output ./monterey-calendar-x86 ./monterey-calendar
$ sudo mkdir -p /usr/local/bin
$ sudo cp ./monterey-calendar-x86 /usr/local/bin/calendar
$ sudo chmod 755 /usr/local/bin/calendar
$ rehash
$ which calendar
/usr/local/bin/calendar
$ calendar -f separators.calendar
Mar 16     Dash ok
Mar 16     Comma ok
Mar 16     Semicolon ok
Mar 16     Colon ok
Mar 16     Dot ok
Mar 16     Space ok
Mar 16     Slash ok
I don't have Ventura running on anything, but the same thing could probably be done for that (assuming the bug isn't evident on Ventura). An alternative for the desperate :)

EDIT: you may need to add Terminal.app to Privacy & Security -> Developer Tools to run an unsigned binary.
 
Last edited:
Amazing stuff Grumpus! I really appreciate the scientific approach where you
experimentally (as it were) nails down the problem and proceed to devise a solution.
I'm kinda desperate in this matter:) and will I'm sure - thanks to your precise
instructions - have bugfree ventura calender & hence my "Today in history" !! up and running
under Sequioa momentarily.
Thank you! 🙏

Edit:
As expected the x86_64 (part of) Ventura calendar works marvelously on macOS 15!
Thanks again :)
 
Last edited:
I submitted a bug report with the Feedback Assistant app, and I hope others will too, or will at least submit feedback using the web site. Also, anyone troubled by a missing /usr/share/calendar can download newish calendar files from the FreeBSD calendar-data github page (use the green button). These files work fine with /usr/bin/calendar.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.