<?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>date &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/date/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Zend_Date::setOptions and format_type in Zend Framework 1.10.3</title>
		<link>/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/</link>
		<comments>/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/#respond</comments>
		<pubDate>Wed, 28 Apr 2010 15:52:49 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">/?p=1516</guid>
		<description><![CDATA[I recently upgraded from the old Zend Framework 1.9.5 to the latest &#8211; 1.10.3. Everything just looked to be working quite fine, except the date formatting. Although I had the same date formatting and options in the old version it seems to be not working. I had the format_type set to PHP and even though &#8230; <a href="/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/" class="more-link">Continue reading <span class="screen-reader-text">Zend_Date::setOptions and format_type in Zend Framework 1.10.3</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/22/zend_date-make-it-work-and-benefit-with-locales/" rel="bookmark" title="Zend_Date &#8211; make it work and benefit with locales">Zend_Date &#8211; make it work and benefit with locales </a></li>
<li><a href="/2009/05/12/zend_date-with-dates-before-1901/" rel="bookmark" title="Zend_Date with dates before 1901">Zend_Date with dates before 1901 </a></li>
<li><a href="/2010/07/21/setting-up-global-cache-in-zend-framework/" rel="bookmark" title="Setting Up Global Cache in Zend Framework">Setting Up Global Cache in Zend Framework </a></li>
<li><a href="/2010/04/29/debugging-in-zend-framework/" rel="bookmark" title="Debugging in Zend Framework">Debugging in Zend Framework </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I recently upgraded from the old <a href="http://framework.zend.com/" target="_blank">Zend Framework</a> 1.9.5 to the latest &#8211; 1.10.3. Everything just looked to be working quite fine, except the date formatting. Although I had the same date formatting and options in the old version it seems to be not working.</p>
<p>I had the format_type set to PHP and even though I formatted the dates with a Zend Framework specific format: <strong>&#8220;d MMM yyyy&#8221;</strong>.</p>
<pre lang="php">
Zend_Date::setOptions(array('format_type' => 'php'));
// ...
$date = new Zend_Date($somedate);
echo $date->get('d MMM yyyy');
</pre>
<p>Now as it appears format_type php in 1.10.3 is giving completely different result, and the correct format is date() like format in PHP.</p>
<pre lang="php">
Zend_Date::setOptions(array('format_type' => 'php'));
// ...
$date = new Zend_Date($somedate);
echo $date->get('d M yy');
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/22/zend_date-make-it-work-and-benefit-with-locales/" rel="bookmark" title="Zend_Date &#8211; make it work and benefit with locales">Zend_Date &#8211; make it work and benefit with locales </a></li>
<li><a href="/2009/05/12/zend_date-with-dates-before-1901/" rel="bookmark" title="Zend_Date with dates before 1901">Zend_Date with dates before 1901 </a></li>
<li><a href="/2010/07/21/setting-up-global-cache-in-zend-framework/" rel="bookmark" title="Setting Up Global Cache in Zend Framework">Setting Up Global Cache in Zend Framework </a></li>
<li><a href="/2010/04/29/debugging-in-zend-framework/" rel="bookmark" title="Debugging in Zend Framework">Debugging in Zend Framework </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Date with dates before 1901</title>
		<link>/2009/05/12/zend_date-with-dates-before-1901/</link>
		<comments>/2009/05/12/zend_date-with-dates-before-1901/#respond</comments>
		<pubDate>Tue, 12 May 2009 12:30:58 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[zend_date]]></category>

		<guid isPermaLink="false">/?p=562</guid>
		<description><![CDATA[Zend_Date Zend_Date is the Zend Framework module for manipulation of dates. It gives several advantages. Everybody how has dealed with dates knows that built in PHP date function cannot manage dates before 1901. With that kind of problems Zend_Date is pretty fine. How to do that If you have only Zend_Date::set($timestamp); is not enough. The &#8230; <a href="/2009/05/12/zend_date-with-dates-before-1901/" class="more-link">Continue reading <span class="screen-reader-text">Zend_Date with dates before 1901</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/" rel="bookmark" title="Zend_Date::setOptions and format_type in Zend Framework 1.10.3">Zend_Date::setOptions and format_type in Zend Framework 1.10.3 </a></li>
<li><a href="/2010/01/22/zend_date-make-it-work-and-benefit-with-locales/" rel="bookmark" title="Zend_Date &#8211; make it work and benefit with locales">Zend_Date &#8211; make it work and benefit with locales </a></li>
<li><a href="/2009/05/12/flex-3-compare-two-dates/" rel="bookmark" title="Flex 3: compare two dates">Flex 3: compare two dates </a></li>
<li><a href="/2011/11/04/how-to-check-if-a-date-is-more-or-less-than-a-month-ago-with-php/" rel="bookmark" title="How to Check if a Date is More or Less Than a Month Ago with PHP">How to Check if a Date is More or Less Than a Month Ago with PHP </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Zend_Date</h2>
<p>Zend_Date is the Zend Framework module for manipulation of dates. It gives several advantages. Everybody how has dealed with dates knows that built in PHP date function cannot manage dates before 1901. With that kind of problems Zend_Date is pretty fine.</p>
<h2>How to do that</h2>
<p>If you have only</p>
<blockquote><p>Zend_Date::set($timestamp);</p></blockquote>
<p>is not enough. The timestamp is an int representation and the framework cannot get the timezone from that and trows an error.</p>
<h2>The simple way to solve the problem</h2>
<p>Replace the line above with these:<span id="more-562"></span></p>
<blockquote><p>$date = new Zend_Date($timestamp);</p>
<p>$date-&gt;setTimezone(&#8216;Europe/Paris&#8217;);</p>
<p>print $date-&gt;toString(&#8216;d M y&#8217;);</p></blockquote>
<p>Now everything should be in place.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/04/28/zend_datesetoptions-and-format_type-in-zend-framework-1-10-3/" rel="bookmark" title="Zend_Date::setOptions and format_type in Zend Framework 1.10.3">Zend_Date::setOptions and format_type in Zend Framework 1.10.3 </a></li>
<li><a href="/2010/01/22/zend_date-make-it-work-and-benefit-with-locales/" rel="bookmark" title="Zend_Date &#8211; make it work and benefit with locales">Zend_Date &#8211; make it work and benefit with locales </a></li>
<li><a href="/2009/05/12/flex-3-compare-two-dates/" rel="bookmark" title="Flex 3: compare two dates">Flex 3: compare two dates </a></li>
<li><a href="/2011/11/04/how-to-check-if-a-date-is-more-or-less-than-a-month-ago-with-php/" rel="bookmark" title="How to Check if a Date is More or Less Than a Month Ago with PHP">How to Check if a Date is More or Less Than a Month Ago with PHP </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/05/12/zend_date-with-dates-before-1901/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 3: compare two dates</title>
		<link>/2009/05/12/flex-3-compare-two-dates/</link>
		<comments>/2009/05/12/flex-3-compare-two-dates/#comments</comments>
		<pubDate>Tue, 12 May 2009 12:22:47 +0000</pubDate>
		<dc:creator><![CDATA[stoimen]]></dc:creator>
				<category><![CDATA[flex 3]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[setTime]]></category>

		<guid isPermaLink="false">/?p=556</guid>
		<description><![CDATA[Theory of Operation You&#8217;re using Flex 3 and want to compare two dates. The format of the dates is string something like &#8220;2009 May 05&#8221;. The question is &#8230; What&#8217;s the best way to compare them Well if you&#8217;ve the dates as strings and you can easily conver them to something like unix timestamps. If &#8230; <a href="/2009/05/12/flex-3-compare-two-dates/" class="more-link">Continue reading <span class="screen-reader-text">Flex 3: compare two dates</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/05/12/zend_date-with-dates-before-1901/" rel="bookmark" title="Zend_Date with dates before 1901">Zend_Date with dates before 1901 </a></li>
<li><a href="/2009/05/20/flex-3-datechooser-utc-issue/" rel="bookmark" title="Flex 3 DateChooser UTC issue">Flex 3 DateChooser UTC issue </a></li>
<li><a href="/2009/03/01/download-custom-flex-3-datechooser-2/" rel="bookmark" title="Download Custom Flex 3 DateChooser">Download Custom Flex 3 DateChooser </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Theory of Operation</h2>
<p>You&#8217;re using Flex 3 and want to compare two dates. The format of the dates is string something like &#8220;2009 May 05&#8221;. The question is &#8230;</p>
<h2>What&#8217;s the best way to compare them</h2>
<p>Well if you&#8217;ve the dates as strings and you can easily conver them to something like unix timestamps. If they are a Date object you can try lik so:<span id="more-556"></span></p>
<blockquote><p>date1 = new Date(&#8216;2009&#8217;);</p>
<p>date2 = new Date(&#8216;1990&#8217;);</p>
<p>if (date1.setTime() &lt; date2.setTime())</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/05/12/zend_date-with-dates-before-1901/" rel="bookmark" title="Zend_Date with dates before 1901">Zend_Date with dates before 1901 </a></li>
<li><a href="/2009/05/20/flex-3-datechooser-utc-issue/" rel="bookmark" title="Flex 3 DateChooser UTC issue">Flex 3 DateChooser UTC issue </a></li>
<li><a href="/2009/03/01/download-custom-flex-3-datechooser-2/" rel="bookmark" title="Download Custom Flex 3 DateChooser">Download Custom Flex 3 DateChooser </a></li>
<li><a href="/2009/02/06/flex-3-custom-preloader/" rel="bookmark" title="Flex 3 Custom Preloader">Flex 3 Custom Preloader </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/05/12/flex-3-compare-two-dates/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
