title: function calculate the right week number of year
body: <p>I am looking for function that give me the right <code>week-number</code>.</p>
  
  <p>The first day of the year should always be on week number 1.
  The first saturday of a year belongs to the first week.</p>
  
  <p>In another words: <a href="https://stackoverflow.com/a/14858473/1216680">here is</a> what i am looking for, but not in <code>PostgreSQL</code>, but in <code>sql-server</code>.</p>
  
  <p>I realy want to do that using a function that i will call later. </p>
  
  <p>Thank you in advance for your help.</p>