#7947: [Time] Calendar doesn't respect current locale's week start day ---------------------------------------+---------------------------- Reporter: hamish | Owner: zooey Type: bug | Status: in-progress Priority: normal | Milestone: R1 Component: Preferences/Time & Date | Version: R1/Development Resolution: | Keywords: time locale Blocked By: | Blocking: Has a Patch: 1 | Platform: All ---------------------------------------+---------------------------- Changes (by zooey): * status: reopened => in-progress Comment: Replying to [comment:11 hamish]: > Here's my ideas for solving this ticket + #6422 and #7652 > > 1. Remove B_WEEK_START_* enum from CalendarView. > 2. Add more general B_DAY_* and B_MONTH_* enums to BDate. > 3. Add functions to locale kit to get day/month names using ICU (in BLocale/BFormattingConventions/new class?). > 4. Have BDate use those functions instead of strftime. > 5. Have BLocale::StartOfWeek() return any day instead of just Mon/Sun (using new BDate enums). > 6. Add something like BLocale::MinDaysInFirstWeek(), which is the other locale-specific calendar parameter provided by ICU. > 7. Have CalendarView query the locale kit for those parameters by default (also, have option to override that behaviour). All that sounds very reasonable and I have already implemented several parts of it locally, but I need to do some more work before I can commit (hopefully later today). Sorry that I didn't mark this ticket as 'in- progress' earlier, I should have. What I find interesting is that strftime() doesn't seem to deliver the right month names, even when one changes the preflet to invoke setlocale() - all the locale-aware posix functions should work already, I must check why this isn't the case here ... On top of what's listed above, I'd like to change BDate/BTime/BDateTime to use an ICU calendar as backend, since it doesn't really make sense to implement the stuff manually, when we have ICU. That would open support for other calendars than Gregorian, too. For all of this to be possible, BDate/BTime/BDateTime & BCalendarView would need to use the locale kit. In order to avoid dependency problems between liblocale & libbe, I think we should just unite those two, i.e. make the locale kit a member of libbe.so. -- Ticket URL: <http://dev.haiku-os.org/ticket/7947#comment:12> Haiku <http://dev.haiku-os.org> Haiku - the operating system.