Here is some updated information I received on calculating week numbers: In the case of using a different week periods the week number is used from the default ISO week, where most of days from the customized period fall into.
Custom weeks: Week Start Week End Thursday - Wednesday plus 3 days Wednesday - Tuesday plus 2 days Tuesday - Monday plus 1 day use start ISO week also for the next Monday Monday - Sunday default ISO Sunday - Saturday minus 1 day use ISO week from following week for Sunday Saturday - Friday minus 2 days use ISO week from following week for Saturday, Sunday Friday - Thursday minus 3 days use ISO week from following week for Friday, Saturday, Sunday On Nov 14, 8:00 am, Glenn <[EMAIL PROTECTED]> wrote: > I would expect the first one to be 53 since that is what I count on my > calendar. I find it strange that he got 52 on the second one instead of 1. > Then again, he's using a different method that you are. Maybe the correct > method is to switch how he is calculating it. > > ...Glenn > > On Fri, Nov 14, 2008 at 8:24 AM, Cerebrus <[EMAIL PROTECTED]> wrote: > > > Assuming that you guys are using the Gregorian Calendar too, my > > results are 53 and 1: > > > --- > > Dim ci As CultureInfo = Thread.CurrentThread.CurrentCulture > > > Dim d As New Date(2008, 12, 29) > > Console.WriteLine(ci.Calendar.GetWeekOfYear(d, > > CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday)) > > 'Result is 53 > > > d = New Date(2009, 3, 1) > > Console.WriteLine(ci.Calendar.GetWeekOfYear(d, > > CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday)) > > 'Result is 1 > > --- > > > Sorry, but I always maintain a steadfast distance from > > Microsoft.VisualBasic namespace and the functions that reside in it.
