Notes from MPUG: "Python one-liners" talk
curiousvenn.com
curiousvenn.com
python -m calendar
When you could just do cal 2013
(with fewer keystrokes). Is there some advantage to using the python version of the above? September 1752
Mo Tu We Th Fr Sa Su
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
"cal 9 1752" on the other hand gives: September 1752
S M Tu W Th F S
1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Maybe python doesn't auto recognize the timezone?EDIT: Actually this is pretty bad because python gets all the days of the week before September 1752 in North America wrong.
Britain and the British Empire (including the eastern part of what is now the United States) adopted the Gregorian calendar in 1752, by which time it was necessary to correct by 11 days. Wednesday, 2 September 1752 was followed by Thursday, 14 September 1752.
So, in this case, it looks like cal is doing the right thing.