📅  最后修改于: 2022-03-11 14:55:18.392000             🧑  作者: Mango
DateTime fdate = yourFinishDate;
DateTime sdate = yourStartDate;
int CountSundays = (1 + fdate.Subtract(sdate).Days + (6 + (int)sdate.DayOfWeek) % 7) / 7;