http://bugzilla.novell.com/show_bug.cgi?id=567944
http://bugzilla.novell.com/show_bug.cgi?id=567944#c0 Summary: FirstDayOfWeek not parsed when creating culture-info-tables.h Classification: Mono Product: Mono: Runtime Version: SVN Platform: All OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: debug AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Description of Problem: FirstDayOfWeek is always Sunday for all cultures. Steps to reproduce the problem: 1. Just check FirstDateOfWeek from DateTimeFormat in any culture. 2. Actual Results: Always Sunday Expected Results: Sunday, Monday, Saturday... How often does this happen? Always Additional Information: This is a problem when parsing lang information in locale-builder.exe tool. The data seems to be available, but not parsed. Here is the portion of code for Driver.cs of locale-builder to solve the problem. I only checked for Sunday, Monday and Saturday, as it seems no current culture starts in other day. private void LookupDateTimeInfo (XPathNavigator nav, CultureInfoEntry ci) .... ni2 = (XPathNodeIterator) ni.Current.Evaluate ("week/firstDay"); if (ni2.MoveNext ()) { XPathNavigator weekday_nav = ni2.Current; switch (weekday_nav.GetAttribute ("day", String.Empty)) { case "sun": df.FirstDayOfWeek = 0; Console.WriteLine(ci.Name+" Week starts on Sunday"); break; case "mon": df.FirstDayOfWeek = 1; Console.WriteLine(ci.Name+" Week starts on Monday"); break; case "sat": df.FirstDayOfWeek = 6; Console.WriteLine(ci.Name+" Week starts on Saturday"); break; default: Console.WriteLine ("unknown first day of week: " + weekday_nav.GetAttribute ("day", String.Empty)); break; } } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
