<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: A simple PHP calendar function</title>
	<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/</link>
	<description>Stuff</description>
	<pubDate>Thu, 08 Jan 2009 11:57:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>

	<item>
		<title>By: Darfuria</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-7128</link>
		<author>Darfuria</author>
		<pubDate>Sat, 22 Sep 2007 10:53:41 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-7128</guid>
					<description>That's super nice.</description>
		<content:encoded><![CDATA[<p>That&#8217;s super nice.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Flipflops</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-7140</link>
		<author>Flipflops</author>
		<pubDate>Sun, 23 Sep 2007 08:04:38 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-7140</guid>
					<description>It's OK - but it does exactly what I want - of course depending on your situation a lot of the code is superfluous - i.e. in a Cake situation - I can ensure that the month and year passed are valid - it becomes a question of where the best place to validate is.</description>
		<content:encoded><![CDATA[<p>It&#8217;s OK - but it does exactly what I want - of course depending on your situation a lot of the code is superfluous - i.e. in a Cake situation - I can ensure that the month and year passed are valid - it becomes a question of where the best place to validate is.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Charon</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-8097</link>
		<author>Charon</author>
		<pubDate>Fri, 23 Nov 2007 11:15:17 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-8097</guid>
					<description>U got a little error in your calendar generation routine 
 line 109 
while($day  1) &#38;&#38; ($day  1) &#38;&#38; ($day </description>
		<content:encoded><![CDATA[<p>U got a little error in your calendar generation routine<br />
 line 109<br />
while($day  1) &amp;&amp; ($day  1) &amp;&amp; ($day</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Flipflops</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-8100</link>
		<author>Flipflops</author>
		<pubDate>Fri, 23 Nov 2007 14:35:18 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-8100</guid>
					<description>Thanks - I'll have a look at that.</description>
		<content:encoded><![CDATA[<p>Thanks - I&#8217;ll have a look at that.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Evert</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9162</link>
		<author>Evert</author>
		<pubDate>Fri, 25 Jan 2008 09:56:51 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9162</guid>
					<description>Great one! Just needed something like this! Thanks for sharing!

One thing is that february is misspelled in the array! febuary vs february! ;)

And maybe change the variable being passed as number of month instead of month name.... also to overcome 'misspellments'....</description>
		<content:encoded><![CDATA[<p>Great one! Just needed something like this! Thanks for sharing!</p>
<p>One thing is that february is misspelled in the array! febuary vs february! <img src='http://www.flipflops.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>And maybe change the variable being passed as number of month instead of month name&#8230;. also to overcome &#8216;misspellments&#8217;&#8230;.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Evert</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9165</link>
		<author>Evert</author>
		<pubDate>Fri, 25 Jan 2008 12:32:22 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9165</guid>
					<description>Plus:
if(($first_day_in_month == $day_list[$i] &#124;&#124; $day &#62; 1) &#38;&#38; ($day  1) &#38;&#38; ($day </description>
		<content:encoded><![CDATA[<p>Plus:<br />
if(($first_day_in_month == $day_list[$i] || $day &gt; 1) &amp;&amp; ($day  1) &amp;&amp; ($day</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Evert</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9166</link>
		<author>Evert</author>
		<pubDate>Fri, 25 Jan 2008 12:34:01 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9166</guid>
					<description>Post went wrong?

But the at the last if-statement is needs to be
$day is smaller OR EQUAL to $days_in_month!</description>
		<content:encoded><![CDATA[<p>Post went wrong?</p>
<p>But the at the last if-statement is needs to be<br />
$day is smaller OR EQUAL to $days_in_month!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: AndyB</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9168</link>
		<author>AndyB</author>
		<pubDate>Sat, 26 Jan 2008 20:08:20 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9168</guid>
					<description>Is this code open source? Can I reuse it? Under what licence?</description>
		<content:encoded><![CDATA[<p>Is this code open source? Can I reuse it? Under what licence?</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Flipflops</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9169</link>
		<author>Flipflops</author>
		<pubDate>Wed, 30 Jan 2008 10:44:17 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9169</guid>
					<description>Hi Andy

I'm glad the calendar function is coming in useful for people. Yes you can re-use it - I'm aware that there are a few bugs etc. but I haven't had a chance to update it yet (apologies)

I intended it to use the MIT license like Cake itself - when I re factored and cleaned up the code a bit.

So anyway feel free to use it but I would really appreciate a reference to the source in the code and if you have blog or website just a quick link back to fliplflops.org - but up to you. Somebody else contacted me about using the coed as the basis for a Cake Helper, but I don't know if they have released any code yet - but it might be worth looking in the bakery.

Cheers

John</description>
		<content:encoded><![CDATA[<p>Hi Andy</p>
<p>I&#8217;m glad the calendar function is coming in useful for people. Yes you can re-use it - I&#8217;m aware that there are a few bugs etc. but I haven&#8217;t had a chance to update it yet (apologies)</p>
<p>I intended it to use the MIT license like Cake itself - when I re factored and cleaned up the code a bit.</p>
<p>So anyway feel free to use it but I would really appreciate a reference to the source in the code and if you have blog or website just a quick link back to fliplflops.org - but up to you. Somebody else contacted me about using the coed as the basis for a Cake Helper, but I don&#8217;t know if they have released any code yet - but it might be worth looking in the bakery.</p>
<p>Cheers</p>
<p>John</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Flipflops</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9170</link>
		<author>Flipflops</author>
		<pubDate>Wed, 30 Jan 2008 10:46:09 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9170</guid>
					<description>Hi Evert 

I know there are a few bugs - and thanks for posting details here  and as mentioned above in my previous comment I do intend to refactor and then publish this as a proper helper when I get a moment. 

In the meantime though it looks like some of you are finding it useful which is great.

John</description>
		<content:encoded><![CDATA[<p>Hi Evert </p>
<p>I know there are a few bugs - and thanks for posting details here  and as mentioned above in my previous comment I do intend to refactor and then publish this as a proper helper when I get a moment. </p>
<p>In the meantime though it looks like some of you are finding it useful which is great.</p>
<p>John</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Stupes</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9213</link>
		<author>Stupes</author>
		<pubDate>Sun, 24 Feb 2008 22:25:53 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9213</guid>
					<description>Awesome!  Thanks so much!</description>
		<content:encoded><![CDATA[<p>Awesome!  Thanks so much!</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Gary</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9214</link>
		<author>Gary</author>
		<pubDate>Tue, 26 Feb 2008 17:41:11 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9214</guid>
					<description>Hello, that's very nice. Could you please explain how you call the calendar function in a cakephp view ? Thanks again.</description>
		<content:encoded><![CDATA[<p>Hello, that&#8217;s very nice. Could you please explain how you call the calendar function in a cakephp view ? Thanks again.</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Flipflops.org &#187; Blog Archive &#187; CakePHP Calendar Helper</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9284</link>
		<author>Flipflops.org &#187; Blog Archive &#187; CakePHP Calendar Helper</author>
		<pubDate>Wed, 09 Apr 2008 09:04:24 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9284</guid>
					<description>[...] six months ago I wrote a post about a Simple PHP calendar function I had written and how it was also really easy to use as a CakePHP [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] six months ago I wrote a post about a Simple PHP calendar function I had written and how it was also really easy to use as a CakePHP [&#8230;]</p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Petter Danielsen</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9296</link>
		<author>Petter Danielsen</author>
		<pubDate>Tue, 22 Apr 2008 22:06:42 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9296</guid>
					<description>$base_url - the url to send the back / foward links on to i.e. the address of page (the calendar expects to be in a mod re-written situation e.g. www.flipflops.org/calendar/2008/june)

What do you mean by that?

Can't get that mod re-written to work. When I click next -&#62; my browser opens some dirs that doesnt exist. What do I have to change? Thanks :)</description>
		<content:encoded><![CDATA[<p>$base_url - the url to send the back / foward links on to i.e. the address of page (the calendar expects to be in a mod re-written situation e.g. <a href="http://www.flipflops.org/calendar/2008/june" rel="nofollow">www.flipflops.org/calendar/2008/june</a>)</p>
<p>What do you mean by that?</p>
<p>Can&#8217;t get that mod re-written to work. When I click next -&gt; my browser opens some dirs that doesnt exist. What do I have to change? Thanks <img src='http://www.flipflops.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
				</item>
	<item>
		<title>By: Flipflops</title>
		<link>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9302</link>
		<author>Flipflops</author>
		<pubDate>Thu, 01 May 2008 08:09:19 +0000</pubDate>
		<guid>http://www.flipflops.org/2007/09/21/a-simple-php-calendar-function/#comment-9302</guid>
					<description>Hi Peter

The alternative to using it in a mod-rewrite type situation is just putting the year / month in the querystring e.g.

/calendar.php?year=2008&#038;month=june 

To go the querystring route you will need to edit line 89 of the function above that generates the back and forward links to output a link + querystring rather than just mod rewrite psuedo directory stuff.

To use something like /calendar/2008/june you will probably need to add a .htaccess file if you don't have one the rule would need to be something like:

&lt;code&gt;

RewriteEngine On

RewriteBase /

RewriteRule ^calendar/([0-9]+)/(*.)$ calendar.php?year=$1&#038;month=$2 [L]

&lt;/code&gt;

(haven't checked the above though - but you get the idea...)

p.s. there might still be a bug in the above code that won't show the last day of the month (can't remember if I have updated it yet).

p.s. 2 - worth looking at the new version of this at http://www.flipflops.org/2008/04/08/cakephp-calendar-helper/</description>
		<content:encoded><![CDATA[<p>Hi Peter</p>
<p>The alternative to using it in a mod-rewrite type situation is just putting the year / month in the querystring e.g.</p>
<p>/calendar.php?year=2008&#038;month=june </p>
<p>To go the querystring route you will need to edit line 89 of the function above that generates the back and forward links to output a link + querystring rather than just mod rewrite psuedo directory stuff.</p>
<p>To use something like /calendar/2008/june you will probably need to add a .htaccess file if you don&#8217;t have one the rule would need to be something like:</p>
<p><code></p>
<p>RewriteEngine On</p>
<p>RewriteBase /</p>
<p>RewriteRule ^calendar/([0-9]+)/(*.)$ calendar.php?year=$1&#038;month=$2 [L]</p>
<p></code></p>
<p>(haven&#8217;t checked the above though - but you get the idea&#8230;)</p>
<p>p.s. there might still be a bug in the above code that won&#8217;t show the last day of the month (can&#8217;t remember if I have updated it yet).</p>
<p>p.s. 2 - worth looking at the new version of this at <a href="http://www.flipflops.org/2008/04/08/cakephp-calendar-helper/" rel="nofollow">http://www.flipflops.org/2008/04/08/cakephp-calendar-helper/</a></p>
]]></content:encoded>
				</item>
</channel>
</rss>
