Opened 11 years ago

Closed 11 years ago

#7126 closed defect (fixed)

dojo.cldr.supplemental.getFirstDayOfWeek returns wrong day for Hebrew ('he')

Reported by: vburckhardt Owned by: Adam Peller
Priority: high Milestone: 1.2
Component: Internationalization Version: 1.1.0
Keywords: internationalization calendar date hebrew locale Cc:
Blocked By: Blocking:

Description

The default locale under Firefox 2 for Hebrew is 'he' (without country code). When the dojo locale is set to 'he' using this information (request header), dojo.cldr.supplemental.getFirstDayOfWeek returns a wrong day (Monday), whereas the Hebrew week starts on Sunday. I've investigated the source code of the function, it seems it is due to the missing country part ('il') in the passed locale. There are a few arbitrary mappings of language-only locales to a country in the code, but none for Hebrew ('he' to 'il').

Note that IE 6 and 7 correctly propose 'he-il' for Hebrew.

Change History (2)

comment:1 Changed 11 years ago by Adam Peller

Component: GeneralInternationalization
Milestone: 1.2
Owner: changed from anonymous to Adam Peller
Status: newassigned

So the first day of week conventions aren't really by language, but by country, and as you point out, browsers don't always specify a country. The current behavior isn't really wrong (in theory, one might be a Hebrew speaker in another country) and I dread adding to the arbitrary mappings we have, but it seems like adding he->il is a good idea.

comment:2 Changed 11 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [14318]) Add mapping for 'he' locale to assume 'il' for country. Fixes #7126

Note: See TracTickets for help on using tickets.