<?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: New version (v2.0) of calendar.class.php now available!</title>
	<atom:link href="http://style-vs-substance.com/calendar-class-php/new-version-v20-of-calendarclassphp-now-available/feed/" rel="self" type="application/rss+xml" />
	<link>http://style-vs-substance.com/calendar-class-php/new-version-v20-of-calendarclassphp-now-available/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 13 Mar 2012 04:54:18 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jim Mayes</title>
		<link>http://style-vs-substance.com/calendar-class-php/new-version-v20-of-calendarclassphp-now-available/comment-page-1/#comment-51</link>
		<dc:creator>Jim Mayes</dc:creator>
		<pubDate>Fri, 21 Mar 2008 20:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/new-version-v20-of-calendarclassphp-now-available/2007/12/#comment-51</guid>
		<description>That&#039;s something that would have to occur outside of the class and it would depend a lot on how you are setting things up.

You&#039;ll need to start by finding the first day of the month for the month you are currently displaying. The class can help out there because it provides the properties year and month on instantiation.

&lt;pre class=&quot;brush:php&quot;&gt;
$example = new Calendar();
$current_month_start = $example-&gt;year . &quot;-&quot; . $example-&gt;month . &quot;-01&quot;;
&lt;/pre&gt;

Then you can do the date math to get next and previous months from there. I suggest using strtotime() to &quot;-1 month&quot; or &quot;+1 month&quot; as the most reliable way to accomplish that task.

The calendar class can output a month if given just the year and month values. Take a look at sample #2 in the download for how that works if you haven&#039;t already. Basically you call the output method with something like:

&lt;pre class=&quot;brush:php&quot;&gt;
print($example-&gt;output_calendar(&#039;2007&#039;, &#039;08&#039;));
&lt;/pre&gt;

except instead of hard coding the year and month like I have there, you would use what you calculated the previous and next months to be.

Like I said, what you want to do is really outside the scope of the calendar class which is just for outputting a 1 month calendar. But hopefully I&#039;ve put you on to the right track.

Taking a look at my post about &lt;a href=&quot;http://style-vs-substance.com/generating-a-year-at-a-time-calendar-with-calendarclassphp/2007/09/&quot; rel=&quot;nofollow&quot;&gt;creating a year-at-a-time calendar&lt;/a&gt; might give you some hints as well.</description>
		<content:encoded><![CDATA[<p>That&#8217;s something that would have to occur outside of the class and it would depend a lot on how you are setting things up.</p>
<p>You&#8217;ll need to start by finding the first day of the month for the month you are currently displaying. The class can help out there because it provides the properties year and month on instantiation.</p>
<pre class="brush:php">
$example = new Calendar();
$current_month_start = $example->year . "-" . $example->month . "-01";
</pre>
<p>Then you can do the date math to get next and previous months from there. I suggest using strtotime() to &#8220;-1 month&#8221; or &#8220;+1 month&#8221; as the most reliable way to accomplish that task.</p>
<p>The calendar class can output a month if given just the year and month values. Take a look at sample #2 in the download for how that works if you haven&#8217;t already. Basically you call the output method with something like:</p>
<pre class="brush:php">
print($example->output_calendar('2007', '08'));
</pre>
<p>except instead of hard coding the year and month like I have there, you would use what you calculated the previous and next months to be.</p>
<p>Like I said, what you want to do is really outside the scope of the calendar class which is just for outputting a 1 month calendar. But hopefully I&#8217;ve put you on to the right track.</p>
<p>Taking a look at my post about <a href="http://style-vs-substance.com/generating-a-year-at-a-time-calendar-with-calendarclassphp/2007/09/" rel="nofollow">creating a year-at-a-time calendar</a> might give you some hints as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: keith</title>
		<link>http://style-vs-substance.com/calendar-class-php/new-version-v20-of-calendarclassphp-now-available/comment-page-1/#comment-50</link>
		<dc:creator>keith</dc:creator>
		<pubDate>Thu, 20 Mar 2008 19:32:02 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/new-version-v20-of-calendarclassphp-now-available/2007/12/#comment-50</guid>
		<description>I am using this script and was very happy with it. Anyway, just want to ask if how to put a next and previous button to move from one month to another.

thanks for a wonderful script!</description>
		<content:encoded><![CDATA[<p>I am using this script and was very happy with it. Anyway, just want to ask if how to put a next and previous button to move from one month to another.</p>
<p>thanks for a wonderful script!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

