/// <summary> /// 获取指定时间在为一年中为第几周 /// </summary> /// <param name="dt">指定时间</param> /// <reutrn>返回第几周</reutrn> private static int GetWeekOfYear(DateTime dt) { GregorianCalendar gc = new GregorianCalendar(); int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay, DayOfWeek.Monday); return weekOfYear; }