Bug#789130: bsdmainutils: [ncal] prints wrong week number

2016-03-11 Thread Michael Meskes
On Thu, Sep 03, 2015 at 10:36:36PM +0200, Sergey Romanov wrote: > Weird. I'd never expect C and C.UTF-8 be different. These are locale values: > $ LC_ALL=C locale week-1stweek > 4 > $ LC_ALL=C.UTF-8 locale week-1stweek > 7 So is this a locale problem then? Michael -- Michael Meskes Michael at

Bug#789130: bsdmainutils: [ncal] prints wrong week number

2015-09-03 Thread Sergey Romanov
It depends on the current locale and what day, Sunday or Monday, counts as start of the week. In C/POSIX, the first Sunday of the year starts week 1: $ LC_ALL=C ncal -wd 2015-01 January 2015 Su 4 11 18 25 Mo 5 12 19 26 Tu 6 13 20 27 We 7 14 21 28 Th 1 8 15 22 29 Fr 2 9 16

Bug#789130: bsdmainutils: [ncal] prints wrong week number

2015-09-03 Thread Sergey Romanov
Weird. I'd never expect C and C.UTF-8 be different. These are locale values: $ LC_ALL=C locale week-1stweek 4 $ LC_ALL=C.UTF-8 locale week-1stweek 7 $ LC_ALL=en_US locale week-1stweek 7 LC_ALL=en_US.utf8 locale week-1stweek 7 $ LC_ALL=de_DE.utf8 locale week-1stweek 4 $ LC_ALL=ru_RU.utf8 locale

Bug#789130: bsdmainutils: [ncal] prints wrong week number

2015-09-03 Thread Sergey Romanov
Ah, sorry, it seems I was wrong about the C locale. I just cannot make out how it counts weeks. Comments in usr.bin/ncal/calendar.c suggest that it uses ISO definition, except when exactly 3 days of the first week are in the preceding year -- in this case it would use the locale value. Still, I

Bug#789130: bsdmainutils: [ncal] prints wrong week number

2015-06-18 Thread Benjamin Dopplinger
Package: bsdmainutils Version: 9.0.6 Severity: normal A similar bug was reported in #676426 which was already archived. This time however, the week's number displayed by ncal is one week behind (24 instead of 25): $ date Thursday 18 June 15:14:18 AEST 2015 $ ncal -w June 2015 Su 7 14