[PATCH 1/1] Remove redundant data for niu_NZ
Mike FABIAN
mfabian@redhat.com
Wed Aug 30 10:51:00 GMT 2017
AKHILESH KUMAR <akhilesh.k@samsung.com> wrote:
>> > -week 7;19971130;1
>>> +copy "niu_NU"
>> > END LC_TIME
>>
>> niu_NU contains:
>>
> week 7;19971130;1
>> first_weekday 2
>>
>> Is âfirst_weekday 2â appropriate for NZ?
>
> yes
> https://www.timeanddate.com/calendar/?country=30
>
>> Is it even right for NU? Isnât this a contradiction to
>>âweek 7;19971130;1â?
>
> Looks "week" needs to change
> http://www.niueisland.com/calendar/?view=calendar&month=August-2017
>
>> https://sourceware.org/glibc/wiki/Locales#LC_TIME says:
>>
>> > week DAYSINWEEK;WEEKSTARTDATE;MINWEEKLEN - DAYSINWEEK is usually 7;
>> > MINWEEKLEN is the minimal length of the first week in year (usually
>> > 4). WEEKSTARTDATE is most confusing - it should be some date that
>>> corresponds to the beginning of a week. It is typically either 19971130
>> (Sunday) or 19971201 (Monday), the former being used almost by all glibc
>> locales (see below).
>>
>> first_weekday N - number of day in the week to be shown in the first
>> column of a calendar. Defaults to 1.
I missed the documentation just below the paragraph I quoted from
> https://sourceware.org/glibc/wiki/Locales#LC_TIME
>
> The tricky thing is how to reconcile information from WEEKSTARTDATE
> and first_weekday. PetrBaudis wrote some lenghty treatises about this on
> libc-locales; we present the outcome and thus our de facto current
> interpretation:
>
> WEEKSTARTDATE specifies the base of the abday and day lists
>
> first_weekday specifies the offset of the first day-of-week in the abday and day lists
>
> For compatibility reasons, all locales should set WEEKSTARTDATE on
> 19971130 (Sunday) and base the abday and day lists appropriately,
> and set first_weekday 1 or 2 depending to whether their week
> actually starts on Sunday or Monday.
>
> Thus, for example en_GB definition (English locale with week starting on Monday) is:
>
> week 7;19971130;4
> first_weekday 2
> first_workday 2
> day "Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
> abday "Sun;Mon;Tue;Wed;Thu;Fri;Sat"
So it is correct to use 19971130 in âweekâ *always*. And all our
locales currently do that.
--
Mike FABIAN <mfabian@redhat.com>
More information about the Libc-alpha
mailing list