title: R: How to get the Week number of the month
body: <p>I am new in R.<br>
  I want the week number of the month, which the date belongs to.</p>
  
  <p>By using the following code:</p>
  
  <pre><code>&gt;CurrentDate&lt;-Sys.Date()
  &gt;Week Number &lt;- format(CurrentDate, format="%U")
  &gt;Week Number
  "31"
  </code></pre>
  
  <p>%U will return the Week number of the year .<br>
  But i want the week number of the month.<br>
  If the date is 2014-08-01 then i want to get 1.( The Date belongs to the 1st week of the month).</p>
  
  <p>Eg:<br>
  2014-09-04 -> 1 (The Date belongs to the 1st week of the month).<br>
  2014-09-10 -> 2 (The Date belongs to the 2nd week of the month).<br>
   and so on...  </p>
  
  <p>How can i get this?</p>
  
  <p>Reference:
  <a href="http://astrostatistics.psu.edu/su07/R/html/base/html/strptime.html">http://astrostatistics.psu.edu/su07/R/html/base/html/strptime.html</a></p>