Is .NET giving me the wrong week number for Dec. 29th 2008?

前端 未结 7 1023
不思量自难忘°
不思量自难忘° 2020-12-31 06:06

According to the official (gregorian) calendar, the week number for 29/12/2008 is 1, because after the last day of week 52 (i.e. 28/12) there are three or less days left in

7条回答
  •  耶瑟儿~
    2020-12-31 06:51

    As a workaround, why not use FirstFourDayWeek but add:

      if ( weekNumber > 52 )
        weekNumber = 1;
    

提交回复
热议问题