C# 指定日期获取当前年份所在周期

GregorianCalendar gc = new GregorianCalendar();

int weekOfYear = gc.GetWeekOfYear(DateTime.Now, CalendarWeekRule.FirstDay, DayOfWeek.Monday);

 Console.WriteLine("当前第{0}周", weekOfYear);


你可能感兴趣的:(C# 指定日期获取当前年份所在周期)