3 ms·
> I think defaulting to removing the days in 1752 is rather Anglo-centric. The utility does use the locale. Since most people here probably have their locale s
by jcranmer 6y ago
> I think defaulting to removing the days in 1752 is rather Anglo-centric.
The utility does use the locale. Since most people here probably have their locale set to en-US (or maybe en-GB/en-CA/etc.), they get the English conversion date. If you were to switch the locale to fr or es, you'd get the 1582 cutoff date. If you were to switch it to sv, you'd get Sweden's conversion date.
- skissane 6y ago> The utility does use the locale. Which utility are we talking about? As the JNRowe's comment notes, there are at least three different versions of cal in circulation: util-linux cal, bsdmainutils cal, and ncal. They don't all do the same thing. util-linux's cal only supports three modes of operation–proleptic Gregorian, Julian, and calendar reform hardcoded to September 1752; it doesn't support any other reformation date. It uses the locale to decide whether to start the week on Monday or Sunday, but not to decide the Julian-Gregorian transition year. BSD cal (used on macOS, Ubuntu, *BSD) only supports 1752 as a transition year and ignores the locale. BSD ncal (available on same platforms) supports other transition years and will use the configured locale to decide which one to use; however, it still falls back to 1752 as a default if locale information is not available.