First day of week and the Vista Calendar Gadget


A user asked how to make the first day of the week on the Vista Calendar gadget a Monday because they’re from Bulgaria and used to Monday as the first day of the week.  (Personally I think Sundays a strange “1st” day too, but that’s a digression)

The first, most obvious method is by changing intl.cpl (windows gem/crystal/start thingy->control panel->regional and language options) user locale to Bulgarian.  The calendar gadget is pretty good about picking up the user settings.  Unfortunately as an HTML dohicky, it doesn’t get notified about changes to the locale, so you’ll either have to delete & readd the gadget or logoff/logon to get it to pick up the change.

If you don’t want a bulgarian locale for some reason there are two other methods.  One is to change the registry (windows+r run prompt, then regedit) key for HKEY_CURRENT_USERControl PanelInternationaliFirstDayOfWeek to “0”.  I don’t recommend using the registry to change user overrides, and its not really supported because we might change it in the future, but I was a bit surprised to NOT find a way to change the first day of the week in the regional options control panel.

The other method would be to use the Locale Builder Tool, which should hopefully be released soon.  (The beta version expired and the final version isn’t quite up on the web site yet.)  Using the locale builder (or custom cultures in .Net), you can create a replacement for en-US (or whatever your favorite locale is) and set the first day of the week to Monday.

Note however that changing the user overrides in the registry will impact every program running as that user, and making a custom replacement locale will change the behavior for the entire machine!


Comments (31)

  1. maslinki says:

    i changed the user locale and location to Bulgaria, restarted, removed and added the gadget, and still not change to the first day of the week.. did it work for you?

    based on your recommendation, i am not going to change the user overrides in the registry… thx

    /m

  2. Squatter says:

    In Australia, we like the weekday to start on a Sunday. By following the aforementioned fix, it’s easy. Navigate to the registry key as described and modify as follows: 0=Mon, 1 =Tues, 2=Wed, 3=Thurs, 4=Fri, 5=Sat, 6=Sun.

    Therefore for an Australian Calendar, modify the value to 6.

  3. Jerry says:

    Hi

    Does anyone know where the key is to set first day of week in Windows 2003 server?

    Thanks in advance

    Jerry

  4. shawnste says:

    The key’s the same on all versions, so this’ll work in Windows 2003 Server and XP as well.

  5. Peter says:

    I`ve been wondering about that as well. Why SUnday?

    So far my only explanation is Jewish vs. Christian calendar. According to the Jewish religion 1st day of the week is SUnday and Christians accepted Monday as the 1st one. So I do not think this is a Bulgarian vs. the rest of the world thing :-)

  6. shawnste says:

    Good question.  Wikipedia has some info (at least at the moment) but doesn’t really answer the question of "why sunday?"

  7. Danie P. says:

    I am not from Bulgaria but I’m from Europe and also a Christian and the first day for the week is Monday.

    Why is it Sunday is really a good question. By the power of the majority in both Europe and USA I think it should be Monday.

    What is more strange is the fact that there is no simple way to change it. It almost feels like it is discrimination to force Windows users to be on Sunday when their custom and traditions say it should be Monday.

    Does anyone from Microsoft reads this? Maybe the next SP of Vista will give us a nice UI we can use to change the first day of the week as we want (?)

  8. Lasse Jari Hansen says:

    None of the above worked for me and iFirstDayOfWeek in the registry was actually already 0.

    What DID work for me, was editing line 123 in "Calendar.Gadgeten-USjscalendar.js".

    Changing "loc.day.first = vbsFirstDayOfWeek()-1;" to "loc.day.first = vbsFirstDayOfWeek();"

    did the trick.

    Now the week starts on mondays in the Vista Calendar Gadget.

    Note: Using Vista Business SP1

  9. shawnste says:

    The “majority” in the US pick Sunday.  We’ll consider the feedback about the UI for the future.  

    Note that the first day of week in the registry should work, however you have to restart the gadget.  I wouldn’t recommend editing the gadget code.

    If your registry already had that value, then that seems a bit odd.  I wonder if you were using terminal server or some other environment so that your settings weren’t being retrieved from the same location.

  10. Lasse Jari Hansen says:

    To my knowledge, most of Europe uses Monday as the first day.

    The article on Wikipedia says "In most of Europe today, and some other countries, Monday is considered to be the first day of the week and is literally named as such in languages such as Mandarin (xingqiyi) and Lithuanian (pirmadienis). The ISO prescribes Monday as the first day of the week with ISO-8601 for software date formats."

    I have this problem on both my desktop machine and laptop. Both machines have an english Vista business installed with the locale set for Denmark. Maybe this is important?

    Every other application on my machine, including Office 2007, gets it right. Except the gadget.

    The setting in the registry IS/WAS correct, but the gadget doesn’t seem to register it. I tried restarting everything, first starting with the gadget, the sidebar and eventually Windows. Only changing the code worked for me.

    What I did though, was to copy the entire gadget and rename it (also inside the files). This way updates and/or file protection won’t kill the changes.

  11. shawnste says:

    Thanks for the extra info.  We’ll try to figure out why the gadget isn’t picking it up.  Does it get everything else right (like the language for the days of the week and the month names?)  Does it get them right if you change your user locale to something else?  (German, English?)  Seems like its going to be hard to troubleshoot.  Are you running 32 bit or 64 bit Vista?

  12. Lasse Jari Hansen says:

    Its 32 bit Vista Business SP 1, English version set to Danish locale.

    I’ve tried setting the locale to German. The notification area clock changes, but the Calendar gadget stays on English.

    Everything (days, months etc.) in the gadget is English, it never picks up my locale.

    I’ve tried using the "Regional->Administrative->Copy to reserved accounts" to no avail.

    If you feel like it, you can contact me on misc_bob_snabelkat.dk where _bob_ should be changed to at.

    I’m willing to test anything (non-destructive) for you. I’m a developer myself.

  13. Marie Fischer says:

    Hi,

    I found this blog through a search as I have a similar problem:

    After installing Vista Service Pack 1 on two PC-s with Estonian locale, the Calendar gadget doesn’t pick up the locale settings any more – so first day of week is Sunday and the month name is in English.

    Before SP1, everything was fine, the week started on Monday and month names were Estonian. All other apps use the correct locale. I changed locale to Germany, but the gadget ignored that too. Also tried with pre-SP1 calendar gadget in case something was changed in the gadget code, but that was no use either.

    Does anybody else have this problem?

  14. Tarmo says:

    I have Vista Business OEM ENG, locale Estonia (first day of week is Monday) and i get same problem after installing SP1.

    Calendar gadget before SP1: first day of week is Monday, month and day names in Estonian.

    Calendar gadget after SP1: first day of week is Sunday, month and day names in English.

    In other programs are calendar settings normal, the problem is only with Calendar gadget.

  15. Iliya says:

    Lasse Jari Hansen’s method DOES indeed work, but for example if today’s Monday, then on the row with the day names (MTWTFSS) the highlighted letter in orange is T (Tuesday). It basically highlights tomorrow’s letter, instead of today’s.

    I am pretty sure this bug can be fixed from the ‘calendar.js’ file, but since I don’t know a lot of JavaScript I cannot fix it myself.

    It would’ve been much easier if Microsoft had just included an extra setting with the gadget for choosing the week start day :( . I can’t believe they didn’t.

  16. lulz says:

    It isn’t picking up the month names either.

  17. I’ve got my locale set to Norwegian. In the registry monday is set as the first day. Every other program displays this correct.

    The gadget refuses to change.

    I have UK keyboard set up as alternative keyboard, but all other settings are set to Norwegian, and my Norwegian keyboard is the default one.

    I was working correctly before though. But at some point it changed. I wonder if it happened with the SP1 upgrade. But I’m not 100% sure.

  18. shawnste says:

    Sorry to hear of the difficulties.  I’ll forward these reports.  Note that after changing locales you must restart the gadget (close it & readd it, or log off & back on) to see any changes.  I had no problem seeing German names once I restarted the gadget.

  19. shawnste says:

    Hmm, what is the system locale for are those of you having difficulties?  (Administrative tab in intl.cpl)  I’m wondering if the gadget started picking up the system locale instead of the user locale?

  20. someone says:

    I have the same problem, after installing SP1 the calendar gadget dosn’t change its language!

  21. shawnste says:

    Well, this can’t be recommended, but I commented out the SetLocale(0) in calendar.html and it *seemed* to work (on my machine).

  22. LA40 says:

    I have the same problem. After installing SP1 the calendar gadget turned to have Sunday as first day of the week and I could not fix. I tried to change the locale, edit registry, readd gadget , restart, whatever. All other applicatatino are working fine except this one.

    I tried even to bugfix SetLocale(0) in calendar.html as adviced, but I could not gain write access to this file.

    MS, please fix it!!!

  23. shawnste says:

    Write access is a bit annoying.  You also need administrator priviledges to edit it.

    Right click on it and then select "Properties", then select the "Security" tab, then "Advanced" and "Owner", then "Edit", then choose "Administrators" as an owner (&/or your user account), then Apply.

    Then you have to click on the security tab, then your account or administrators, then Edit, then "full control".  

    Then you should be able to open the file in Notepad or something and comment out SetLocale(0).  It isn’t easy. :(

    Another (safer) option is to copy the entire gadget and then edit it, but I forget how to get it registered with the sidebar.

    I don’t own the calendar gadget, but the gadget team is aware of the problem.

    If you try this fix, please let me know if there are additional issues.

  24. Nikolaj says:

    where du you find the

    "Calendar.Gadgeten-USjscalendar.js"

    i cant find it anywhere… the funny part it that when i look at the normal calder (the one you see when clicking on the left corner of the taskbar)

    then it says monday as first day of week…

    its just the gadget and there is no different with using standard calender or googles version…

  25. Gayito says:

    In calendar.js, delete vbsSetLocale(""); or coment vbsSetLocale(""); as //vbsSetLocale("");

    And solve the problem.

    bye….

  26. woras says:

    Just edit SetLocale(0)to SetLocale(your language code)from http://www.science.co.il/Language/Locale-Codes.asp?s=decimal

  27. aku says:

    1. open (local disc) c >Program Files>Windows Sidebar>Gadgets>Calender.Gadget>en-US>js

    2. open ‘calender’ file inside ‘js’ folder with notepad.

    3. change ‘vbsSetLocale(“”)’ to ‘//vbsSetLocale(“”) as mentoned by Gayito.

    4. save it and close. add gadget to sidebar. thats all. its work for me.

    if u cant do step 3, just move ‘js’ folder to desktop and make a copy folder and make the changing to the copied folder. when done, put it to the original location. hope it help.

  28. Parham says:

    thanks Shawn,

    it did work by changing the reg.

    Vista, in general, has been a disaster!

  29. demented says:

    Lasse Jari Hansen 27 Mar 2008 4:59 PM

    "<…>Monday is considered to be the first day of the week and is literally named as such in languages such as Mandarin (xingqiyi) and Lithuanian (pirmadienis). <…>"

    I am Lithuanian and it should be Monday ^^. (I did registry change, btw, and it worked.)

  30. Ron Beckett says:

    What I find annoying is in Windows 7, MS set Monday as the first day of the week for Australia but we use Sunday as the first day – and one can't change it.

  31. shawnste says:

    I believe you open Regional Options (Win + R, and type intl.cpl then Enter is an easy way), select "Additional Settings", then "Date", and change the "First Day of Week" field to whatever you desire.