I have following code to get the weeknumber of the year given in the DateTime object Time
public static int WeeksInYear(DateTime date)
{
Grego
You can use the class Week of the Time Period Library for .NET which supports supports the ISO 8601 week numbering:
TimeCalendar calendar = new TimeCalendar(
new TimeCalendarConfig { YearWeekType = YearWeekType.Iso8601 } );
Week week = new Week( new DateTime( 2012, 01, 01 ), calendar );
Console.WriteLine( "week #: ", week.WeekOfYear );