.Net 使用 GregorianCalendar 获取任意一天为一年的第几周
private static int GetWeekOfYear(DateTime dt) { GregorianCalendar gc = new GregorianCalendar(); int weekOfYear = gc.GetWeekOfYear(dt, CalendarWeekRule.FirstDay/*设置第一天*/, DayOfWeek.Monday/*设置周一为一周的第一天*/); return weekOfYear; }