<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Get a List of Years and Months in a Date Range with PHP</title>
	<atom:link href="http://www.protocolostomy.com/2008/05/15/get-a-list-of-years-and-months-in-a-date-range-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.protocolostomy.com/2008/05/15/get-a-list-of-years-and-months-in-a-date-range-with-php/</link>
	<description>Made with only the finest 1's and 0's</description>
	<lastBuildDate>Thu, 26 Jan 2012 21:20:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: roman</title>
		<link>http://www.protocolostomy.com/2008/05/15/get-a-list-of-years-and-months-in-a-date-range-with-php/comment-page-1/#comment-52417</link>
		<dc:creator>roman</dc:creator>
		<pubDate>Fri, 16 Sep 2011 08:26:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=299#comment-52417</guid>
		<description>$start = $month = strtotime(&#039;2003-01-04&#039;);
$end = strtotime(&#039;2005-09-18&#039;);
				
while($month &lt;= $end)
{
  // there init array using date(&#039;M&#039;,$month), date(&#039;Y&#039;,$month) or other
  $month = strtotime(date(&#039;Y-n&#039;, $month).&#039; +1 month&#039;);
}</description>
		<content:encoded><![CDATA[<p>$start = $month = strtotime(&#8217;2003-01-04&#8242;);<br />
$end = strtotime(&#8217;2005-09-18&#8242;);</p>
<p>while($month &lt;= $end)<br />
{<br />
  // there init array using date(&#039;M&#039;,$month), date(&#039;Y&#039;,$month) or other<br />
  $month = strtotime(date(&#039;Y-n&#039;, $month).&#039; +1 month&#039;);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xxx</title>
		<link>http://www.protocolostomy.com/2008/05/15/get-a-list-of-years-and-months-in-a-date-range-with-php/comment-page-1/#comment-50623</link>
		<dc:creator>xxx</dc:creator>
		<pubDate>Tue, 30 Nov 2010 08:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=299#comment-50623</guid>
		<description>there is a bug in this code, today is 2010-11-30 and when I generate month array from today to 2011-11-18 function return
2010-11
2010-12
2011-01
2011-03
2011-04
2011-05
2011-06
2011-07
2011-08
2011-09
2011-10
2011-11

without february because february 2011 have just 28 days 
to fix this bug you need to change 

this line 
$time1 = strtotime(date(&#039;Y-m-d&#039;, $time1).&#039; +1 month&#039;);
into this
$time1 = strtotime(date(&#039;Y-m&#039;, $time1).&#039; +1 month&#039;);</description>
		<content:encoded><![CDATA[<p>there is a bug in this code, today is 2010-11-30 and when I generate month array from today to 2011-11-18 function return<br />
2010-11<br />
2010-12<br />
2011-01<br />
2011-03<br />
2011-04<br />
2011-05<br />
2011-06<br />
2011-07<br />
2011-08<br />
2011-09<br />
2011-10<br />
2011-11</p>
<p>without february because february 2011 have just 28 days<br />
to fix this bug you need to change </p>
<p>this line<br />
$time1 = strtotime(date(&#8216;Y-m-d&#8217;, $time1).&#8217; +1 month&#8217;);<br />
into this<br />
$time1 = strtotime(date(&#8216;Y-m&#8217;, $time1).&#8217; +1 month&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shiva</title>
		<link>http://www.protocolostomy.com/2008/05/15/get-a-list-of-years-and-months-in-a-date-range-with-php/comment-page-1/#comment-8829</link>
		<dc:creator>shiva</dc:creator>
		<pubDate>Wed, 11 Feb 2009 12:31:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=299#comment-8829</guid>
		<description>Thanks a lot for your help.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for your help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

