Search code examples
calendar

What Unix command-line program prints holidays?


Ages ago, I remember there was a command-line Unix program that would print out major holidays in the USA. With command-line options, it could print out Islamic, Discordian, and even Canadian holidays.

I can't seem to find this program now. The closest I can get is emacs' "list-holidays" function. It's possible the program I remember just called an emacs function from the command line or something.

EDIT: In addition to 'calendar', 'gcal' will do this too.


Solution

  • Are you looking for calendar?

    This will show all the upcoming holidays.

    $ calendar
    Jul 26  Bilbo rescued from Wargs by Eagles
    Jul 26  Independence Day in Liberia
    Jul 26  National Day in Maldives
    

    This shows all US bank holidays upcoming in the next +1 days.

    $ calendar -f /usr/share/calendar/calendar.usholiday -W +1
    Nov 11  Veterans' Day
    

    This package is maintained by the BSD community and can be installed in debian and ubuntu from bsdmainutils.