/// <summary> /// 计算日期星期几 /// </summary> /// <param name="dtNow">日期(DateTime类型)</param> /// <returns></returns> public string CaculateWeekDay(DateTime dtNow) { var weekdays = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; return weekdays[(int)dtNow.DayOfWeek]; }