<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 24 May 2013 18:37:04 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Getting Dates from Week Numbers in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16080</guid>
      <link>http://www.phpdeveloper.org/news/16080</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has a <a href="http://www.lornajane.net/posts/2011/Getting-Dates-From-Week-Numbers-in-PHP">quick handy post</a> to her blog today showing how you can grab the date (a timestamp) from the week number of the year.
</p>
<blockquote>
Recently I've been building a little project that pulls data from Google Analytics and shows your web statistics in a simple form. One thing I wanted to do was show the data for a quarter, but graphing by day is too chaotic and graphing by month only gives three points, so I wanted to graph by week. This was fine but the data returned by Analytics only gives me the week numbers, and since this project is aimed at demystifying web stats for normal people, it really needs normal dates on it!
</blockquote>
<p>
Thanks to the <a href="http://uk2.php.net/manual/en/book.datetime.php">DateTime</a> functionality built in to PHP and the <a href="http://uk2.php.net/manual/en/datetime.setisodate.php">setIsoDate</a> function, pulling the date back is a simple single call away. She also points out the reverse - using the "W" in a <a href="http://php.net/date">date</a> call to return the week.
</p>]]></description>
      <pubDate>Tue, 30 Nov 1999 00:00:35 -0600</pubDate>
    </item>
  </channel>
</rss>
