Try this code..
Source: https://stackoverflow.com/a/11154921/1997983
var d = new DateTime(2018, 12, 31);
CultureInfo cul = CultureInfo.CurrentCulture;
var firstDayWeek = cul.Calendar.GetWeekOfYear(
d,
CalendarWeekRule.FirstDay,
DayOfWeek.Monday);
int weekNum = cul.Calendar.GetWeekOfYear(
d,
CalendarWeekRule.FirstDay,
DayOfWeek.Monday);
int year = weekNum == 52 && d.Month == 1 ? d.Year - 1 : d.Year;
Console.WriteLine("Year: {0} Week: {1}", year, weekNum);
It is returning 1 for week 53 as per ISO-8601
http://blogs.msdn.com/b/shawnste/archive/2006/01/24/iso-8601-week-of-year-format-in-microsoft-net.aspx
If you check the week of 31 Dec 2018, it will start from 30 Dec which falls on Saturday. From this year-2018 it will contain only two dates.. 30 and 31. Rest all 5 dates are from next year i.e. 2019. Hence it is returning 1 as the week number which is correct as per ISO-8601 standard.