<?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>Sat, 18 May 2013 09:09:41 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPro.org: Calculate Friday The 13th With Datetime Class]]></title>
      <guid>http://www.phpdeveloper.org/news/11476</guid>
      <link>http://www.phpdeveloper.org/news/11476</link>
      <description><![CDATA[<p>
As an introduction to the Datetime class functionality PHP 5 has, <i>Kevin Waterson</i> <a href="http://www.phpro.org/examples/Calculate-Friday-The-13th-With-Datetime-Class.html">shows how</a> to use it to calculate the "Friday the 13th" for any year.
</p>
<blockquote>
This class is a request from a PHPRO.ORG regular who asked for a method to calculate Friday the 13th for the next n years. The calculation itself is easy, however, it presents a good opportunity to introduce the PHP datetime class. 
</blockquote>
<p>
He points out that timestamps, because of they way integers are handled, have a somewhat limited lifespan (2038) and dates beyond that cannot be determined by the usual <a href="http://www.php.net/date">date</a> functions. Instead, he shows how to set up a DateTime object, set a timezone and loop through the days to find the Fridays that land on the 13th.
</p>]]></description>
      <pubDate>Mon, 01 Dec 2008 08:46:51 -0600</pubDate>
    </item>
  </channel>
</rss>
