Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Dates & Times   (RSS)

DateTime.Parse() and DateTime.TryParse() fail in some cases

DateTime.Parse and DateTime.TryParse fail in .Net 2.0 if the user locale date override has a space in it. Ie: if its something like "M d yyyy". .Net is getting tripped up over the space (we're working on a fix for SP1/Orcas). A workaround is to pass the

DateTime.Parse() fails when separator is " " (space) in .Net v2.0 RTM

In Whidbey (Microsoft.Net v2.0), DateTime.Parse() throws an exception if the date separator is a space. This was fixed in future QFEs, including the Whidbey Vista release, so you'll only see this on XP, 2003, etc and not on Vista. This is fixed in future
Posted by shawnste | 0 Comments
Filed under:

How do I get localization in JScript (JavaScript) in IE7?

I ran into an interesting problem with a Vista sidebar calendar gadget. It seems that it is not exactly trivial to find out interesting NLS data like localized month names, first day of week, etc. from JScript. Eventually I found a workaround for some

ISO 8601 Week of Year format in Microsoft .Net

Several people have noticed that Calendar.GetWeekOfYear() is almost like the ISO 8601 week when passed CalendarWeekRule.FirstFourDayWeek and DayOfWeek.Monday , however it is a little bit different. Specifically ISO 8601 always has 7 day weeks. If the
Posted by shawnste | 5 Comments
Filed under:

Custom Time Zones in Windows

Someone asked about adding the "Olson" database of timezones to Windows, and I learned about tzedit.exe and the registry keys. Tzedit.exe is a simple tool that allows you to add or edit the time zone registry entries, which live in the registry at HKLM\Software\Microsoft\Windows
 
Page view tracker