Note: /usr/bin/date is not affected, so it is probably not strftime()s
fault:

    $ date --date=2021-01-01 +%V
    53
    $ date --date=2021-01-04 +%V
    01

(Same with LC_TIME=de_DE.UTF-8, as below.)

 - Roland

On Tue, Dec 01, 2020 at 10:51:05AM +0100, Roland Hieber wrote:
> Package: ncal
> Version: 12.1.7
> Severity: important
> 
> Dear Maintainer,
> 
> it seems that the output for week numbers for 2021 is incorrect:
> 
>     $ LC_TIME=de_DE.UTF-8 ncal -w3
>       November 2020     Dezember 2020     Januar 2021       
>     Mo     2  9 16 23 30     7 14 21 28        4 11 18 25   
>     Di     3 10 17 24     1  8 15 22 29        5 12 19 26   
>     Mi     4 11 18 25     2  9 16 23 30        6 13 20 27   
>     Do     5 12 19 26     3 10 17 24 31        7 14 21 28   
>     Fr     6 13 20 27     4 11 18 25        1  8 15 22 29   
>     Sa     7 14 21 28     5 12 19 26        2  9 16 23 30   
>     So  1  8 15 22 29     6 13 20 27        3 10 17 24 31   
>        44 45 46 47 48 49 49 50 51 52  1     1  2  3  4  5   
> 
> Here January 2021 starts with week 1 on Friday, the 1st of January.
> 
> The manpage for ncal(1) mentions:
> 
>     STANDARDS
>     [...]
>          The week number computed by -w is compliant with the ISO 8601
>          specification.
> 
> ISO 8601 computes the week number depending on the year in which
> Thursday occurs, so 2020 should end on a Thursday with week 53.
> 
> The same call on a system with bsdmainutils 11.1.2+b1 displays the
> correct week numbers, with week 53 spanning over the two years, and
> week 1 starting with 2021-01-04.
> 
>  - Roland
> 
> 
> -- System Information:
> Debian Release: bullseye/sid
>   APT prefers testing
>   APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
> 'testing-debug'), (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 5.6.0-2-amd64 (SMP w/4 CPU threads)
> Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
> Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
> LANGUAGE=en_US:en
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> 
> Versions of packages ncal depends on:
> ii  libc6      2.31-3
> ii  libtinfo6  6.2+20200918-1
> 
> ncal recommends no packages.
> 
> ncal suggests no packages.
> 
> -- no debconf information

Reply via email to