cal

Apr. 17th, 2010 02:53 pm
damned_colonial: A Babbage machine, and the words "Difference engine" (difference engine)
[personal profile] damned_colonial posting in [community profile] command_liners
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?

Date: 2010-04-17 10:12 pm (UTC)
foxfirefey: Look at this wee octopus! LOOK AT IT! (squee)
From: [personal profile] foxfirefey
! 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.

Date: 2010-04-17 11:21 pm (UTC)
exor674: Computer Science is my girlfriend (Default)
From: [personal profile] exor674
If you use ncal instead of cal, the -s country_code option can be used to tell it which swithover to use.

Date: 2010-04-18 01:24 am (UTC)
jld: (popcorn)
From: [personal profile] jld
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.

Date: 2010-04-18 03:19 pm (UTC)
jportela: (Default)
From: [personal profile] jportela
Nice tip. Glad I found this community :)

Date: 2010-04-18 05:09 pm (UTC)
cheyinka: a spoof of an iPod ad, featuring a Metroid with iPod earbuds pressed against each of its 3 internal organs (iMetroid iScree)
From: [personal profile] cheyinka
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).

Profile

command_liners: A command line prompt with a blinking cursor after it, green against black. (Default)
Command Liners

January 2022

S M T W T F S
      1
2 345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 10th, 2025 07:11 am
Powered by Dreamwidth Studios