I am currently trying to calculate the weeknumber using the dayOfYear
string dateStr = $"{Model.Date:dddd, d MMMM}";
Date.Text = char.ToUpper(dateStr[0]) + dateStr.Substring(1);
WeekOfYear.Text = $"Week {Model.Date.DayOfYear / 7}";
The only thing is this sometimes gives back the wrong weeknumber because it gives back a double and not a weeknumber.
Is there a better way to calculate this?