摘要:
/// /// 计算本周起始日期(礼拜一的日期) /// /// 该周中任意一天 /// 返回礼拜一日期,后面的具体时、分、秒和传入值相等 public static DateTime CalculateFirstDateOfWeek(DateTime someDate) { int i = someDate.DayOfWeek - DayOfWeek.Monday; if (i == -1) i = 6;// i值 > = 0 ,因为枚举原因,Sunday排在最前,此时Sunday-Monday=-1,必须+7=6。 TimeSpan ts = new TimeS... 阅读全文