Hacker News new | ask | show | jobs
by ajlburke 3468 days ago
If you're on a Linux/MacOS/BSD machine, "ncal -p" on the command line gives you a nifty list of when various countries switched to Gregorian.

Interesting factoid: Russia's "October Revolution" actually took place in November in most of the rest of the world!

(edit: I had originally said ncal works on all "POSIX" systems but that turned out to be incorrect)

3 comments

    $ ncal -p
     AL Albania        1912-11-30      IT Italy          1582-10-04
     AT Austria        1583-10-05      JP Japan          1918-12-18
     AU Australia      1752-09-02      LI Lithuania      1918-02-01
     BE Belgium        1582-12-14      LN Latin          9999-05-31
     BG Bulgaria       1916-03-18      LU Luxembourg     1582-12-14
     CA Canada         1752-09-02      LV Latvia         1918-02-01
     CH Switzerland    1655-02-28      NL Netherlands    1582-12-14
     CN China          1911-12-18      NO Norway         1700-02-18
     CZ Czech Republic 1584-01-06      PL Poland         1582-10-04
     DE Germany        1700-02-18      PT Portugal       1582-10-04
     DK Denmark        1700-02-18      RO Romania        1919-03-31
     ES Spain          1582-10-04      RU Russia         1918-01-31
     FI Finland        1753-02-17      SI Slovenia       1919-03-04
     FR France         1582-12-09      SW Sweden         1753-02-17
     GB United Kingdom 1752-09-02      TR Turkey         1926-12-18
     GR Greece         1924-03-09     *US United States  1752-09-02
     HU Hungary        1587-10-21      YU Yugoslavia     1919-03-04
     IS Iceland        1700-11-16
Sorted:

    1582-10-04 ES Spain
    1582-10-04 IT Italy
    1582-10-04 PL Poland
    1582-10-04 PT Portugal
    1582-12-09 FR France
    1582-12-14 BE Belgium
    1582-12-14 LU Luxembourg
    1582-12-14 NL Netherlands
    1583-10-05 AT Austria
    1584-01-06 CZ Czech Republic
    1587-10-21 HU Hungary
    1655-02-28 CH Switzerland
    1700-02-18 DE Germany
    1700-02-18 DK Denmark
    1700-02-18 NO Norway
    1700-11-16 IS Iceland
    1752-09-02 AU Australia
    1752-09-02 CA Canada
    1752-09-02 GB United Kingdom
    1752-09-02 US United States
    1753-02-17 FI Finland
    1753-02-17 SW Sweden
    1911-12-18 CN China
    1912-11-30 AL Albania
    1916-03-18 BG Bulgaria
    1918-01-31 RU Russia
    1918-02-01 LI Lithuania
    1918-02-01 LV Latvia
    1918-12-18 JP Japan
    1919-03-04 SI Slovenia
    1919-03-04 YU Yugoslavia
    1919-03-31 RO Romania
    1924-03-09 GR Greece
    1926-12-18 TR Turkey
    9999-05-31 LN Latin
... and now you know why the minimum DateTime value in SQL Server is Jan 1, 1753. It's the start of the first full year after the United States (colonies) transition to the Gregorian calendars.

(And, BTW, if you do have a need for older dates, it's very troublesome to project the Gregorian calendar back before its adoption-- use the Julian day count method instead. It's goofy but well-adopted and well-supported.)

Imagine all the poor programmers in the alternate universe where the US was similarly stubborn about its calendar system as it is now about its measurement system, with everyone having to convert between Julian & Gregorian on a daily basis.
using java.util.Date O.O
This is a bit anachronistic, since Canada in 1752 was still part of France, depending on how you see it (Acadia had been in British hands since 1710). I also wonder what political entities are counted for Germany.
For Germany it's the year the Protestant states of the Holy Roman Empire adopted it. The Catholic part had adopted it ~120 years before.
New France, technically, which at the time was a region spanning from Cape Breton through to New Orleans.
I would put Italy first - I mean, Pope Gregory was born Ugo Boncompagni and he was presumably in Rome when the idea was proposed and enacted.
heh, at the time the Italy we think of didn't really exist.

https://upload.wikimedia.org/wikipedia/commons/4/46/Italy_17...

This was how it looked as late as 1796...

I figured they were all catholic so they'd have switched at the same time, but it looks like the Republic of Venice, at least, took a while to change to the new calendar, and March 1st "new year" celebrations are still celebrated in some areas:

https://it.wikipedia.org/wiki/More_veneto

Interesting that Slovenia and Yugoslavia are reported as separate countries (with suspiciously close switching dates). Technically, in 1919 neither country existed - what is now Slovenia was a constituent of Kingdom of Serbs, Croats and Slovenes, which was renamed to Kingdom of Yugoslavia in 1929.
I wonder if Slovenia did really not switch before 1919. It was part of the same "country" as what are now Austria and the Czech Republic for hundreds for years before that, who according to the list switched in the 16th century.

It seems unlikely that what is now Slovenia would use a different calendar than the rest of the Habsburg Monarchy/Austrian Empire for such a long time, particularly since there was no subdivision of the Empire that directly corresponds to modern Slovenia.

It's interesting that Lithuania and Poland have different dates too. Poland and Lithuania were a union back in 1582 and the change was made throughout the Commonwealth. It was switched back during Russian occupation in 19th century though. Both in Lithuania and Poland switched to Gregorian again after WWI.
That is weird to see Belgium in there in 1582. That's the date the territories covered by present day country switched over ? There must be some interesting edge cases there.
At that time, the current territories of Belgium, the Netherlands and Luxembourg were part of the Spanish Netherlands. (https://en.wikipedia.org/wiki/Spanish_Netherlands)
Just a thought, but I wonder what that program would say about a place called the United States of America in another 50-75 years

Maybe Mexico and Canada would not be listed, after both have been made part of the new USNA (United States of North America).

Just a thought.

Makes me think of Shadowrun, where you have UCAS, CAS and Aztelan (to name but a few)...
I don't know the history of all Belgian territories, but the Prince-Bishopric of Liège was part of Germany, also known at the time the "Holy Roman Empire".
Very strange Australia is listed with 1752 as adoption date. The island was not colonized (by Europeans) until 1788 and did not become a country until 1901.

I think the number was grandfathered in from British Commonwealth.

Why the 5-31 in Latin ?
Looking at the source [0], the date field is specified as the last date of the Julian calendar used by that locale. Since LN is the Julian calendar and will never change, it's presumably set to the max date value that the calendar.h date type can represent (AD 10,000) minus the day-counting delta between the two calendars over that period.

I look forward to being dead long before the Y10k problem crops up.

[0] https://opensource.apple.com/source/misc_cmds/misc_cmds-32/n...

I tried to find an explanation and only found a fellow seeker of the truth [0] that also couldn't find the answer [1]. He probably tried to search for it more than me.

I found the Apple source code for ncal [2], but no answers there. Also it is funny that Latin line has the month entered in octal (05).

[0] https://hackingtom.blogspot.de/2012/04/date-of-easter-and-nc...

[1] https://xkcd.com/979/

[2] https://opensource.apple.com/source/misc_cmds/misc_cmds-32/n...

Damn, you stole my chance to link to the xkcd comic. Randall does have an xkcd for everything.
France might first have switched in 1582, but that ignores the bit in the middle where they decimalised time and reset the year counter: https://en.wikipedia.org/wiki/French_Republican_Calendar
We don't talk about that.

(Unless you read stuff such as Karl M.'s 18th Brummaire of Louis Bonaparte, but then you're beyond help.)

    > If you're on a POSIX machine.
Don't you just mean some Linux distros & BSDs? I don't see any indication that ncal is standardized by POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilitie...

According to the Linux manpage it's a FreeBSD command originally introduced in FreeBSD 2.2.6 in 1998: https://www.freebsd.org/releases/2.2.6R/announce.html

My apologies
Is there a command to list countries that are still not on Gregorian?