title: Calculating the number of weeks for each year based on dates using R
body: <p>I have a dataset with dates of 2 different years (2009 and 2010) and would like to have the corresponding week number for each date. </p>
  
  <p>My dataset is similar to this:</p>
  
  <pre><code>  anim &lt;- c(012,023,045,098,067)
    dob &lt;- c("01-09-2009","12-09-2009","22-09-2009","10-10-2010","28-10-2010")
    mydf &lt;- data.frame(anim,dob)
    mydf
      anim    dob
  1   12   01-09-2009
  2   23   12-09-2009
  3   45   22-09-2009
  4   98   10-10-2010
  5   67   28-10-2010
  </code></pre>
  
  <p>I would like to have variable "week" in the third column with the corresponding week numbers for each date.</p>
  
  <p>EDIT:
  Note: Week one begins on January 1st, week two begins on January 8th for each year</p>
  
  <p>Any help would be highly appreciated.</p>
  
  <p>Baz</p>