[lug] Remember Y2K?

Jed S. Baer blug at jbaer.cotse.net
Tue Feb 25 17:37:04 MST 2014


On Tue, 25 Feb 2014 06:27:45 -0700
Davide Del Vento wrote:

> > So besides being an abomination, %W I think violates the rule of least
> > surprise.
> 
> Besides what others have said about ISO and private businesses rules for
> when a week starts...
> What least surprise?

The surprise that happens when you're testing or relying on a function,
looking at your calendar and counting weeks, and getting a result you're
not anticipating? This is surprising because, to quote Reb Tevye,
"Tradition!" Simple observation shows that the vast majority of
Westerners consider Sunday to the be 1st day of the week. Res ipsa
loquitur. The least surprising thing would be, if one is using W as a
format specifier for week, to use the most common weekday as your
starting day. However, investigation of the man page shows that using the
most obvious formulation isn't a strong point of that function, e.g.:

%p     locale's equivalent of either AM or PM; blank if not known
%P     like %p, but lower case

Wouldn't it be more intuitive and easy to remember if the capital form of
the format specifier produced a capitalized result?

I am, indeed, thumbing my nose at ISO 8601. It dates from 1988. The
Gregorian Calendar was established in 1582. So Phththht!


More information about the LUG mailing list