tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Weekday abbreviations in output of cal(1)



Hello,

looking at the output of cal(1) on NetBSD today, I noticed a bit of an
oddity with how weekdays are abbreviated.

Here's a comparison between Linux and NetBSD:

# Linux

$ LC_ALL=C cal 5 2019
      May 2019
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


# NetBSD

$ LC_ALL=C cal 5 2019
      May 2019
 S  M Tu  W Th  F  S
          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


So, in the output of NetBSD's cal(1), days are abbreviated with one
letter, except for Tuesday and Thursday.

I'd say this is:

  * inconsistent
  * potentially misleading (Saturday and Sunday are both just "S".)
  * unnecessarily cryptic

I had initially run into this on NetBSD 8.1, but people in #NetBSD on
Freenode confirmed that it's still the same in 9.1.

The IRC discussion also revealed that OpenBSD's cal(1) uses the
two-letter abbreviations, just like the Linux command. As the Linux
command has apparently been imported from FreeBSD at some point, their
output will likely look the same.

So, I'd say that, maybe, changing cal(1) in NetBSD to use two-letter
abbreviations throughout as well would also be a good thing concerning
compatibility with what other (widely-used) Unix-like operating systems do.

What do you think?


--Michael


Home | Main Index | Thread Index | Old Index