title: Get Week Of The Year
body: <p>Delphi Xe, Win 7, System TimeZone UTC+4:0, The first day of week in system - Monday, Time is synchronised with time.windows.com</p>
  
  <p>In a palette of standard components Delphi Win32 there is component MonthCalendar, at it property WeekNubers=true (display of numbers of weeks), date=now, the first day - Monday.</p>
  
  <p>Shows on 19 number (today) - number of week 43.</p>
  
  <p>I request number through dateutils.WeekOfTheYear(now) = returns 42.</p>
  
  <p><img src="https://i.stack.imgur.com/yTGrj.png" alt="enter image description here"></p>
  
  <p>Source (0.5 Mb) <a href="http://www.sendspace.com/file/yuz6ko" rel="nofollow noreferrer">http://www.sendspace.com/file/yuz6ko</a></p>
  
  <p>Judging by an initial code of component MonthCalendar - there like all it is true (even if not to expose the first day of week, it takes value from system parametres).</p>
  
  <p>And in inquiry WeekOfTheYear it is told, that all is considered also standard ISO applied, but numbers do not coincide :(</p>
  
  <p>In any way I will not understand, where one week disappears - if to look on a calendar, should be 43 and if to consider, that weeks 53 and the first concerns last year...</p>
  
  <p>By the way WeekOfTheYear on 01.01.2011 too returns 52 though like should return 1...</p>
  
  <p>Why distinctions and where it is correct?</p>