Package: bsdmainutils
Version: 8.0.13
Severity: minor

With LC_TIME=C, ncal -w gives strange week numbers for 2010:

$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

$ ncal -w 2010
                                  2010
    January           February          March             April
Su     3 10 17 24 31     7 14 21 28        7 14 21 28        4 11 18 25
Mo     4 11 18 25     1  8 15 22        1  8 15 22 29        5 12 19 26
Tu     5 12 19 26     2  9 16 23        2  9 16 23 30        6 13 20 27
We     6 13 20 27     3 10 17 24        3 10 17 24 31        7 14 21 28
Th     7 14 21 28     4 11 18 25        4 11 18 25        1  8 15 22 29
Fr  1  8 15 22 29     5 12 19 26        5 12 19 26        2  9 16 23 30
Sa  2  9 16 23 30     6 13 20 27        6 13 20 27        3 10 17 24
   52 53  1  2  3  4  4  5  6  7  8     8  9 10 11 12    12 13 14 15 16
[...]

Why is the week starting at January 3rd numbered 53, not 1?

With option -M, the results looks better:

$ ncal -w 2010 -M
                                  2010
    January           February          March             April
Mo     4 11 18 25     1  8 15 22        1  8 15 22 29        5 12 19 26
Tu     5 12 19 26     2  9 16 23        2  9 16 23 30        6 13 20 27
We     6 13 20 27     3 10 17 24        3 10 17 24 31        7 14 21 28
Th     7 14 21 28     4 11 18 25        4 11 18 25        1  8 15 22 29
Fr  1  8 15 22 29     5 12 19 26        5 12 19 26        2  9 16 23 30
Sa  2  9 16 23 30     6 13 20 27        6 13 20 27        3 10 17 24
Su  3 10 17 24 31     7 14 21 28        7 14 21 28        4 11 18 25
   53  1  2  3  4     5  6  7  8        9 10 11 12 13    13 14 15 16 17
[...]


With LC_TIME=de_DE.UTF-8, the result is fine, probably because that
locale implies -M. LC_TIME=de_DE.UTF-8 ncal -w 2010 -S gives the strange
result, again.

The same behaviour occurs for year 2016, which also starts on a Friday.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.36-rc5-smapi-x61s-amd64-00006-g02a4040 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bsdmainutils depends on:
ii  bsdutils                  1:2.17.2-3.1   Basic utilities from 4.4BSD-Lite
ii  debianutils               3.4            Miscellaneous utilities specific t
ii  libc6                     2.11.2-5       Embedded GNU C Library: Shared lib
ii  libncurses5               5.7+20100313-2 shared libraries for terminal hand

bsdmainutils recommends no packages.

Versions of packages bsdmainutils suggests:
ii  cpp                           4:4.4.4-2  The GNU C preprocessor (cpp)
pn  vacation                      <none>     (no description available)
ii  wamerican [wordlist]          6-3        American English dictionary words 
ii  whois                         5.0.7      an intelligent whois client

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to