damned_colonial: A Babbage machine, and the words "Difference engine" (difference engine)
damned_colonial ([personal profile] damned_colonial) wrote in [community profile] command_liners2010-04-17 02:53 pm

cal

One of my favourite random unix command line things:

skud@Watson:~$ cal 05 1891
      May 1891
Su Mo Tu We Th Fr Sa
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

skud@Watson:~$ cal 04 1891
     April 1891
Su Mo Tu We Th Fr Sa
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30


I use this all the time when writing fic in historical fandoms! (It also works for the future, even beyond 2038.)

I've never yet written anything set in September of 1752, but this is interesting:

skud@Watson:~$ cal 09 1752
   September 1752
Su Mo Tu We Th Fr Sa
       1  2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30


I'm not sure if it's locale aware, though... 1752 was the British (and colonies) switchover to the Gregorian calendar, but Russia didn't switch til 1918, and Greece til 1923. Anyone know?
foxfirefey: Look at this wee octopus! LOOK AT IT! (squee)

[personal profile] foxfirefey 2010-04-17 10:12 pm (UTC)(link)
! Ohmigosh I totally did not know about this before but it is awesome and I am going to use it now instead of my OS X widget.
exor674: Computer Science is my girlfriend (Default)

[personal profile] exor674 2010-04-17 11:21 pm (UTC)(link)
If you use ncal instead of cal, the -s country_code option can be used to tell it which swithover to use.
jld: (popcorn)

[personal profile] jld 2010-04-18 01:24 am (UTC)(link)
Meanwhile, on NetBSD, there's a cal with a -R reform-spec option, which takes either an arbitrary date or the spelled-out name of a country. (And doesn't turn the calendar sideways like ncal does.)

Hooray for Unix diversity. At least it's not as bad as when I was trying to make a cross-platform calendar(1) setup.
jportela: (Default)

[personal profile] jportela 2010-04-18 03:19 pm (UTC)(link)
Nice tip. Glad I found this community :)
cheyinka: a spoof of an iPod ad, featuring a Metroid with iPod earbuds pressed against each of its 3 internal organs (iMetroid iScree)

[personal profile] cheyinka 2010-04-18 05:09 pm (UTC)(link)
I'm a big fan of cal -3 [whatever]... it shows three months, one before and one after the month you chose (or the current month, if you didn't).