I noticed both Tim Bray and John Roberts‘ recent ruminations on the perfect calendar solution, and while I don’t have the answer, in thinking about it I realized that I have a quirky calendar-related habit that has stuck with me for over a decade, throughout all my own various experiments with Palm Desktop, Outlook, iCal, etc. On a daily basis, I use the Unix cal
command to help schedule my life. I don’t know what I would do without it.
When looking at broad swaths of time (say, a whole year), nothing beats the good ol’ cal
command for quickly giving you a lay of the land when you’re making scheduling decisions far in advance (for conferences, vacations, etc.) Just type “cal 2006” and you’ve got the whole year laid out before you:
Of course, the Unix cal
command is a read-only environment, so once I determine whether a particular date works for whatever I’m doing, I have to put my commitment on a writeable calendar somewhere — but I still couldn’t do without my cal
.
Anyone else out there do this?
Completely guilty of same behavior – still do it on my mac when I’m in the Darwin terminal window too.
Yup. Darn useful thing.
I once inherited a bit of Web code that shelled out to run cal and parsed the result in order to build a calendar page for a given month. I was surprised at how well it worked (and how much code I had to write to do the same thing without shelling out.)
Calendars are hard, and cal does them well.
Now that you mention it, I’m pretty sure I wrote some code a long time ago that did just that (i.e. the shell out to cal and parsing).
I’m not a C programmer (and not that interested in become one at this point), but I’m guessing the cal source code is either amazingly elegant or the hack to beat all hacks.
I didn’t know the cal command even existed… Never done much in Unix. That’s one reason I read other people’s blogs on a regualr basis!
Works great in OS X terminal. I noticed that to view 2006 data you need to say cal 07… I had to type cal 06 twice to realize i was looking at ’05 data. This of course makes sense but it did surprise me the first time.
Hey Chad,
I have this calendar concept rolling around in my head… I’ve been talking with bradley and a ton of others about it. I’d like to run it by you when you have a moment, I’ll ping ya soon.
Yes, guilty too.
One of the nice things about the Mac’s transformation to Unix under the hood is that it now comes with cal support built in! 🙂
Wayne – if you’re literally typing ‘cal 07’, then you’re looking at the calendar for 7 A.D.
Cal is very useful. I like it too.
If you need a cli program for dates and appointments
you can use ‘when’. Perhaps now you don’t need separate paper calendars anymore.
http://www.lightandmatter.com/when/when.html
Another program i can recommend is DevTodo.
It has nothing to do with calendars, but i find it extremly useful.
Think of you have to clean up a directory.
When you enter it – DevTodo can remember you to do it!
It saves directory dependent todo lists.
http://swapoff.org/DevTodo
I run GeekTool on OS X. This allows me to run the output of terminal commands as part of the “desktop background”. Also, I disabled all Finder Icons on the desktop background using a utility called “Cocktail”. You can then have some logs to always run on your desktop, and also the output of “cal -y”. I would like to use a more modern version that also has the -m option (my weeks start on Monday), and Apple only includes an 1994 version of the cal command.
I do it all the time!
Another useful one I use in Ubuntu or it just comes with gnome I think…
zenity –calendar
pops up a calendar for the current month but you can click around by month and by year.
Why in AIX does my cal 2007 command only give me my calendar with 2 months across instead of 3. I want it 3 months across. Can anyone help?
I love the Unix “cal” command. It’s so convenient when I want to check what day of the week a specific day falls on. (I wish there was a Windows equivalent that was just as easy to use.)
Recently I learned how to mentally calculate the day of the week for any date since 1800. When I come across a date in a book or article I’m reading, I like to figure out the day of the week it falls on, and then use the “cal” command to check my answer.
(Incidentally, I use John Conway’s “Doomsday Rule” to mentally calculate the day of the week of any given date. If you’re interested in checking it out, you can look up “Doomsday Rule” on Wikipedia.)
I am trying to port this to windows cmd shell and to dos 32-bit today. while there are some old ports to dos, they do not run well and get truncated.