📜  计算两天之间的星期几 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:18.392000             🧑  作者: Mango

代码示例1
DateTime fdate = yourFinishDate;
DateTime sdate = yourStartDate;

int CountSundays = (1 + fdate.Subtract(sdate).Days + (6 + (int)sdate.DayOfWeek) % 7) / 7;