/// 取得某月的第一天 /// </summary> /// <param name="datetime">要取得月份第一天的时间</param> /// <returns></returns> private DateTime FirstDayOfMonth(DateTime datetime) { return datetime.AddDays(1 - datetime.Day); }