Display calendar with specific national holidays and week numbers

gcal -K -q GB_EN 2009 # display holidays in UK/England for 2009 (with week numbers)
NB when you run this gcal command in your shell, holidays are highlighted but this highlighting does not show in the sample output (above). To find full details on gcal options: gcal --long-help | less Example for United States, Pennsylvania: gcal -K -q US_PA 2009 # display holidays in USA/Pennsylvania for 2009 (with week numbers) Example for Hong Kong: gcal -K -q HK 2009 # display holidays in Hong Kong for 2009 (with week numbers)
Sample Output
2009


      January                   February                   March
 Su Mo Tu We Th Fr Sa CW   Su Mo Tu We Th Fr Sa CW   Su Mo Tu We Th Fr Sa CW
              1  2  3 52    1  2  3  4  5  6  7 05    1  2  3  4  5  6  7 09
  4  5  6  7  8  9 10 01    8  9 10 11 12 13 14 06    8  9 10 11 12 13 14 10
 11 12 13 14 15 16 17 02   15 16 17 18 19 20 21 07   15 16 17 18 19 20 21 11
 18 19 20 21 22 23 24 03   22 23 24 25 26 27 28 08   22 23 24 25 26 27 28 12
 25 26 27 28 29 30 31 04                             29 30 31             13
                                                                            


       April                      May                       June
 Su Mo Tu We Th Fr Sa CW   Su Mo Tu We Th Fr Sa CW   Su Mo Tu We Th Fr Sa CW
           1  2  3  4 13                   1  2 17       1  2  3  4  5  6 22
  5  6  7  8  9 10 11 14    3  4  5  6  7  8  9 18    7  8  9 10 11 12 13 23
 12 13 14 15 16 17 18 15   10 11 12 13 14 15 16 19   14 15 16 17 18 19 20 24
 19 20 21 22 23 24 25 16   17 18 19 20 21 22 23 20   21 22 23 24 25 26 27 25
 26 27 28 29 30       17   24 25 26 27 28 29 30 21   28 29 30             26
                           31                   22                          
[truncated for brevity]

5
By: mpb
2009-03-15 10:19:52

What Others Think

If you do not have the gcal command it can easily be installed. For example, on Mandriva Linux: urpmi gcal
mpb · 601 weeks and 3 days ago
Doesn't seem to exist in macports, however the similar tool 'pal' is available on that platform. Nice to see some updates to cal!
philiph · 601 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: