This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 1/1] Remove redundant data for niu_NZ
- From: Mike FABIAN <mfabian at redhat dot com>
- To: AKHILESH KUMAR <akhilesh dot k at samsung dot com>
- Cc: "libc-alpha\@sourceware.org" <libc-alpha at sourceware dot org>
- Date: Wed, 30 Aug 2017 12:51:52 +0200
- Subject: Re: [PATCH 1/1] Remove redundant data for niu_NZ
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=mfabian at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9A77C68BD
- References: <email@example.com> <firstname.lastname@example.org> <CGME20170829095817epcas5p304aa40080cdddc030515d98b403b3760@epcms5p7> <20170830041254epcms5p76717daa962767370c4dde581c3a550a4@epcms5p7>
AKHILESH KUMAR <email@example.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?
>> Is it even right for NU? Isn’t this a contradiction to
> Looks "week" needs to change
>> 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
> 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
> 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 <firstname.lastname@example.org>