<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chris Morrell &#187; zend_date</title>
	<atom:link href="http://cmorrell.com/tag/zend_date/feed" rel="self" type="application/rss+xml" />
	<link>http://cmorrell.com</link>
	<description>The personal home page of Chris Morrell</description>
	<lastBuildDate>Thu, 02 Feb 2012 16:34:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Calculating the difference in days between two Zend_Date objects</title>
		<link>http://cmorrell.com/webdev/calculating-the-difference-in-days-between-two-zend_date-objects-373</link>
		<comments>http://cmorrell.com/webdev/calculating-the-difference-in-days-between-two-zend_date-objects-373#comments</comments>
		<pubDate>Wed, 18 Nov 2009 17:46:12 +0000</pubDate>
		<dc:creator>Chris M.</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[wishlist]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend_date]]></category>

		<guid isPermaLink="false">http://cmorrell.com/?p=373</guid>
		<description><![CDATA[This just came up on #zftalk, and it appears that the information out there is either incomplete or incorrect, so I thought I&#8217;d just put out a simple solution.  Here&#8217;s a simple way to calculate the difference between two Zend_Date &#8230; <a href="http://cmorrell.com/webdev/calculating-the-difference-in-days-between-two-zend_date-objects-373">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This just came up on <a href="http://zftalk.com/">#zftalk</a>, and it appears that the information out there is either incomplete or incorrect, so I thought I&#8217;d just put out a simple solution.  Here&#8217;s a simple way to calculate the difference between two Zend_Date objects (in days):</p>
<pre class="brush: php; title: ; notranslate">
$jan1 = new Zend_Date('1.1.2009', Zend_Date::DATES);
echo &quot;\nJanuary first: &quot;, $jan1-&gt;toString();

$christmas = new Zend_Date('25.12.2009', Zend_Date::DATES);
echo &quot;\nChristmas is on: &quot;, $christmas-&gt;toString();

$diff = $christmas-&gt;sub($jan1);
echo &quot;\nNumber of days: &quot;, $diff / 60 / 60 / 24;
</pre>
<div class="su-linkbox" id="post-373-linkbox"><div class="su-linkbox-label">Link to this post!</div><div class="su-linkbox-field"><input type="text" value="&lt;a href=&quot;http://cmorrell.com/webdev/calculating-the-difference-in-days-between-two-zend_date-objects-373&quot;&gt;Calculating the difference in days between two Zend_Date objects&lt;/a&gt;" onclick="javascript:this.select()" readonly="readonly" style="width: 100%;" /></div></div>]]></content:encoded>
			<wfw:commentRss>http://cmorrell.com/webdev/calculating-the-difference-in-days-between-two-zend_date-objects-373/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 17/24 queries in 0.482 seconds using disk: basic
Object Caching 354/412 objects using disk: basic
Content Delivery Network via cdn1.cmorrell.com

Served from: cmorrell.com @ 2012-02-09 16:15:59 -->
