New in Windows Vista: updates to clock and calendar
by Michael S. Kaplan, published on 2005/12/21 11:01 -08:00, original URI: http://blogs.msdn.com/michkap/archive/2005/12/21/506427.aspx
It was almost nine months ago since I pointed out that The WinForms DateTimePicker and MonthCalendar do not support culture settings.
And there was also the time I talked about Calendars in other languages.
I tried to point out that WinForms was merely wrapping the Shell common controls, which do not support other calendars. So there is nothing to be done.
More recently I posted about how The calendar applet limps along.
I received 17 email responses to these two posts from various people on my team here in Redmond, in Ireland, and from the folks on the Shell team who wondered if I was aware of the efforts to support things a bit more effectively in Vista.
I was! It is just that it was to early to talk about it yet. And the blog entry was about the problem someone was having back then.
Now yesterday, Adam Nathan posted some screenshots from the December CTP on Windows Vista here and he included that little clock/calendar applet, so I thought it might make sense to show one of the exciting capabilities that is in the December CTP build. I suspect Paul Thurrott will be getting to them eventually, too (with the other five pages of screenshots and exhaustive reviews). :-)
If you have access to that build then you can play with the stuff below and enjoy yourself -- if no, perhaps Paul will be covering it in a future set of screenshots on the winsupersite. :-)
There is of course the standard new cool calendar and clock you get when you
doublesingle-click on the time as Adam indicated:
UPDATE 12:28pm -- As I just learned from John Murphy (one of those guys in Ireland!), you only need to SINGLE-click to get the flyout to fly out, not a double click....
Now what happens if you change your default user locale to Arabic (Saudi Arabia)?
Wow, it is supporting non-Gregorian calendars! And this is not a fluke, you can try changing to Thai, the Japanese Emporer calendar, or even the Hebrew calendar:
Clearly the problems described in The calendar applet limps along have been fixed, and they were fixed by making use of the Shell controls, and of course making the Shell controls understand other calendars. In essence, the MonthCal and DateTimePicker controls in the Windows Shell now can support many other calenders -- an awesome feature done with the cross-group work of our team (a little in Redmond and a lot in Ireland -- you folks rock!) and the Shell folks. A much cooler international story, all the way around. :-)
Now does this mean the problems described in The WinForms DateTimePicker and MonthCalendar do not support culture settings are fixed? Well, if you think about it, they may or may not be. Especially when you consider that the WinForms code was written before this feature even existed, it is unclear whether WinForms will be taking the appropriate steps as a control host to change the setting. Definitely something to try on your Vista machine! And something that I can cover later as well.
There is obviously a lot more to this feature and what has been done with it and what can be done with it in Vista, that I will cover another time. There are even other features tucked away and waiting for the explanation in upcoming blog entries.
I may even see if I can get someone (maybe a "guest blogger"?) to say a few words about what it was like to move some of the algorithms that were done in managed code back into the unmanaged world.
But for now, I just wanted to make sure all the people looking at Adam's blog would not wonder whether Microsoft had fixed the "international thing" with that clock/calendar applet -- we did!
In future posts I'll talk about the interactions with the managed controls, some of the other new features, and even more exciting Vista stuff.
And if you have the December CTP build, then start playing with it -- many exciting new features are in there....
This post brought to you by "ฟ" (U+0e1f, THAI CHARACTER FO FAN)
# Maurits on Wednesday, December 21, 2005 2:20 PM:
Everything's localized but the numbers, eh?
Do Arabic users read numbers left-to-right? Or, to look at it a different way, do they read numbers little-endian?
# Michael S. Kaplan on Wednesday, December 21, 2005 2:28 PM:
Actually, digit substitution is an overridable setting that varies with the locale -- it is not really being localized so much as that setting, and RTL display is a localization option (and I am on an English system at the moment!).
I should probably get into some of those issues in future posts, though!
# Mihai on Wednesday, December 21, 2005 2:31 PM:
Not sure if it is the same question with Maurits, but: do Arabic users have the days going left-to-right in calendars?
Shoud it be this? I have to check with some natives :-)
7 6 5 4 3 2 1
14 13 12 11 10 9 8
21 20 19 18 17 16 15
28 27 26 25 24 23 22
31 30 29
# Michael S. Kaplan on Wednesday, December 21, 2005 2:44 PM:
That is one of his questions, in fact. :-)
# PatriotB on Wednesday, December 21, 2005 2:53 PM:
Wow. Cool stuff! Great to see the common controls getting updated.
I must admit, however, I am going to miss the old-school GDI clock that we've had for the past 10+ years.
# Paul M on Wednesday, December 21, 2005 4:11 PM:
The left to right issue was the first thing I thought of when I saw the screencaps. But, I don't see any examples of arabic calendars on the net... I think I'll change my search language... Ah-ha:
They are both the (gregorian?) calendar, constraining the differences to the L2R/R2L issue. I also see a lot of hybrid examples like this:
This issue also brings up the sticky issue of localizing/converting between entirely different calendar systems. Just how far does the localization you requested need to go, anyway, Mr. User?
This could get *really* complicated. Converting appointments between two calendar systems could be a nightmare. I just learned in my googling that dates on the islamic calendar start, not at 'midnight', but at sunset the previous day. How confusing.
# Paul M on Wednesday, December 21, 2005 4:17 PM:
P.S. Why did the control get so much wider under arabic?
# Michael S. Kaplan on Wednesday, December 21, 2005 4:38 PM:
Everyone -- I did verify that when I changed the digit substitution from 'context' to 'national' that I got the Hindi digits rather then our Arabic-Indic ones.
Paul -- Yes, the calendar issue is an unusual one for Bidi -- and the line between the UI language vs. user locale gets very blurred there.
The width has to do with the width of the text on the control (which ends being based on font info more than anything else).
# Maurits on Wednesday, December 21, 2005 5:04 PM:
> dates on the islamic calendar start, not at 'midnight', but at sunset the previous day
Makes sense to me. How do you know when "midnight" is? Sunset is obvious.
What still blows my mind is that all cultures agree on a seven-day week, especially since there's no corresponding celestial cycle.
# Michael S. Kaplan on Wednesday, December 21, 2005 6:50 PM:
Well, there may be places that do not -- but none that are yet supported on Windows!
# Matthew W. Jackson on Wednesday, December 21, 2005 7:21 PM:
Do you still get a clock and calendar if you single-click on the tray clock and you are not an Administrator?
Obviously you shouldn't be able to set the time, but I'm going to be seriously annoyed if I get a message box stating "You do not have the proper privlege level to change the System Time" every time I accidentally (or purposfully) click on the time.
# Michael S. Kaplan on Wednesday, December 21, 2005 7:30 PM:
Hi Matthew --
In fact, you do get the flyout, you do not have to be an administrator -- the confusion regarding the old behavior was addressed with extreme prejudice (to borrow the terminology of another profession).
# Maurits on Wednesday, December 21, 2005 8:18 PM:
Hmmm... I'm guessing you need administrative privileges to:
* Change the date or time
* Set, change, or delete the NTP server
* Change the SYSTEM time zone (if such a thing exists)
* Change the SYSTEM locale settings (if such a thing exists)
but anyone can:
* View the date and time
* Page through the calendar
* Change the user time zone
* Change the user locale settings
* Manually trigger an NTP update, if the server is set
# Michael S. Kaplan on Wednesday, December 21, 2005 8:22 PM:
Well, there are not yet user time zones, but the rest looks about right. :-)
# abhinaba on Thursday, December 22, 2005 12:50 AM:
Is there a list? I mean are the Indian calenders supported as well?
# Michael S. Kaplan on Thursday, December 22, 2005 1:17 AM:
There are not any in Vista at the moment, sorry. Is there a particular calendar you were interested in?
# Si on Thursday, December 22, 2005 1:36 AM:
Why did you turn ClearType off for these screen grabs?
# Michael S. Kaplan on Thursday, December 22, 2005 9:29 AM:
It was not intentional, I promise. :-)
But I grabbed them through a Terminal Services session from my XPSP2 machine to me Vista machine. Both have ClearType turned on, but apparently that was not good enough.... :-(
# Maurits on Thursday, December 22, 2005 11:59 AM:
Whoa... different users of the same computer can't independently choose their own time zone?
# Michael S. Kaplan on Thursday, December 22, 2005 12:46 PM:
You never noticed, Maurits?
Yes, I will be covering this in future blog post. :-)
# Si on Thursday, December 22, 2005 1:09 PM:
> But I grabbed them through a Terminal Services session from my XPSP2 machine to me Vista machine.
That explains it, CT over TS is still a work in progress.
# Maurits on Friday, December 23, 2005 1:49 PM:
What do Terminal Server clients do, then? Just live with the server time zone? Guess I'll wait for the post. :)
Ever toyed with the idea of localizing to fantasy locales like Tengwar/Hobbit/Klingon? Hobbit has a seven-day week, but with "leap days" (that belong to no week...)
# silverpie on Tuesday, December 27, 2005 2:34 PM:
Not to mention a historical calendar that had 10-day weeks and leap days outside the weeks (the French Revolutionary).
# Crissov on Tuesday, December 27, 2005 3:42 PM:
I’d like to see the major (Gregorian) calendar reform proposals supported, e.g. Symmetry454, if that’s not too simple. After all it’s not impossible that one of them could get wider support.
For most of these you definitely need week numbers! Actually any serious and/or ISO-conform calendar would feature them. (I assume all European localisation start the week on Monday.)
Can /really/ traditionalistic Chinese or French revolutionists use their time/clock format in Vista?
And where are the indicators for the current time (and date) in the company/domain/server time zone or the one retrieved from GPS information (or similar), if available? ;)
# Michael S. Kaplan on Tuesday, December 27, 2005 5:05 PM:
Hmmm.... well, Symmetry454 may be interesting but I would imagine there might have to be a bit more support behind it before it would magically pop up in Windows.
Please consider a donation
to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.
go to newer or older post, or back to index or month or day