Get DateTime for the nth Sunday after today
-
07-11-2019 - |
Question
I'm using the following to get the current week number:
var weekNo = CultureInfo.CurrentCulture.Calendar.GetWeekOfYear(DateTime.UtcNow,
CalendarWeekRule.FirstFullWeek,
DayOfWeek.Sunday);
And I want to return the DateTime
representing the first day of the nth week after today.
e.g. when n = 2, I would want the DateTime
representing the Sunday after next.
Is there a way I can do this in C#?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow