摘要:
DateTime dt = DateTime.Now; //当前时间DateTime startWeek = dt.AddDays(1 - Convert.ToInt32(dt.DayOfWeek.ToString("d"))); //本周周一DateTime endWeek = startWeek.AddDays(6); //本周周日DateTime startMonth = dt.AddDays(1 - dt.Day); //本月月初DateTime endMonth = startMonth.AddMonths(1).AddDays(-1); //本月月末//DateTime endMo 阅读全文