GetWeekOfYear varies depending on the FirstDayOfWeek and the CalendarWeekRule used.
Imports System
Imports System.Globalization
Public Class SamplesCalendar
Public Shared Sub Main()
Dim myCI As New CultureInfo("en-US")
Dim myCal As Calendar = myCI.Calendar
Dim myCWR As CalendarWeekRule = myCI.DateTimeFormat.CalendarWeekRule
Dim myFirstDOW As DayOfWeek = myCI.DateTimeFormat.FirstDayOfWeek
Console.WriteLine(myCal.GetWeekOfYear(DateTime.Now, myCWR, myFirstDOW))
End Sub
End Class
Related examples in the same category