接上判断当日为本周第几天,接下来循环获取周一至当前日对应的日期:
for (int j = 0; j < DayinWeek; j++) { //星期对应Date string date = DateTime.Now.AddDays(1 - DayinWeek + j).ToString("yyyyMMdd"); }
接上判断当日为本周第几天,接下来循环获取周一至当前日对应的日期:
for (int j = 0; j < DayinWeek; j++) { //星期对应Date string date = DateTime.Now.AddDays(1 - DayinWeek + j).ToString("yyyyMMdd"); }