Blog

View Blog

Oct 1

Written by: Rainer Stropek
10/1/2007

I just stumbled accross a very nasty bug in the .NET Framework/MSDN Library. Calendar.GetWeekOfYear does not do what is documented in MSDN Library. If you call Calendar.GetWeekOfYear for the 31st December 2007 and CalendarWeekRule FirstFourDayWeek you will get 53.

According to MSDN Library, FirstFourDayWeek should comply to ISO 8601. However, according to ISO 8601 the 31st December 2007 is week 1 on 2008!

Shawn Steele has documented a workaround in his Blog.

Tags:

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment    Cancel  

Newsletter

Sie möchten im Newsletter über aktuelle technische Entwicklungen und Neuigkeiten rund um cubido informiert werden?

Newsletter abonnieren ...

Blog