I have a function that get the current weeknumber from the given date
e.g.
GregorianCalendar cal = new GregorianCalendar(GregorianCalendarTypes.Localized);
return cal.GetWeekOfYear(date, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
gives back weeknumber 40 for DateTime.Now.
So my question is , also my problem, i need to get the dates in the returned week. I’ve tried several thing and none so for worked.
You could use this function to get the first date of a week:
Then you can get all dates in this week in the following way:
or in one line: