From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8963 invoked by alias); 25 May 2004 21:48:51 -0000 Mailing-List: contact glibc-bugs-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sources.redhat.com Received: (qmail 8944 invoked by uid 48); 25 May 2004 21:48:49 -0000 Date: Tue, 25 May 2004 21:48:00 -0000 From: "pere at hungry dot com" To: glibc-bugs@sources.redhat.com Message-ID: <20040525214848.181.pere@hungry.com> Reply-To: sourceware-bugzilla@sources.redhat.com Subject: [Bug localedata/181] New: [PATCH] POSIX first_weekday should be sunday X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg00068.txt.bz2 List-Id: At the moment, the first_weekday value for POSIX and C locale is saturday. It should be sunday. This test program demonstrates the problem: #include #include #include int main() { char *locale = "C"; int week_1stday; int first_weekday; int first_workday; setlocale(LC_TIME, locale); week_1stday = (int)nl_langinfo(_NL_TIME_WEEK_1STDAY); first_weekday = *nl_langinfo(_NL_TIME_FIRST_WEEKDAY); first_workday = *nl_langinfo(_NL_TIME_FIRST_WORKDAY); printf("week_1stday for '%s' locale = %d\n", locale, week_1stday); printf("first_weekday for '%s' locale = %d\n", locale, first_weekday); printf("first_workday for '%s' locale = %d\n", locale, first_workday); return 0; } It should print '1' for first_weekday, but prints 7 instead. The first_* values are relative to the week_1stday date. The value 19971130 is a sunday, so 1 would be a sunday while 7 would be a saturday. I'll attach a patch which I believe fixes the issue. -- Summary: [PATCH] POSIX first_weekday should be sunday Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: localedata AssignedTo: pere at hungry dot com ReportedBy: pere at hungry dot com CC: glibc-bugs at sources dot redhat dot com http://sources.redhat.com/bugzilla/show_bug.cgi?id=181 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.