-1

I'm getting a 28 instead 27 of week number with GetWeekOfYear. Is my computer crazy?

Thanks.

  • Check to make sure your computers date is correct – Aiden Grossman Jul 08 '16 at 00:30
  • Coul you try this: Dim weekOfyear As New Integer Dim cul As CultureInfo = CultureInfo.CurrentCulture weekOfyear = cul.Calendar.GetWeekOfYear(Today, CalendarWeekRule.FirstDay, DayOfWeek.Monday) – augustogmaraujo Jul 08 '16 at 00:48
  • 2
    Possible duplicate of [GetWeekOfYear returns the wrong week number](http://stackoverflow.com/questions/38258118/getweekofyear-returns-the-wrong-week-number) – Michael Liu Jul 08 '16 at 03:27

1 Answers1

0

Your computer is probably fine. C# getWeekOfYear can sometimes count weeks differently based on how you consider in between weeks. I would check this question out to see if it might shed some light on the situation(Get week number for the given date c#).

Community
  • 1
  • 1
Edward
  • 23
  • 7
  • Thanks, but I tried every way... Dim weekOfyear As New Integer Dim cul As CultureInfo = CultureInfo.CurrentCulture weekOfyear = cul.Calendar.GetWeekOfYear(HeaderString, CalendarWeekRule.FirstDay, DayOfWeek.Monday) – augustogmaraujo Jul 08 '16 at 00:43