<?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>Matt Fraser &#187; shotty code</title>
	<atom:link href="http://mattf.ca/tag/shotty-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattf.ca</link>
	<description>Internet Marketing Dundada</description>
	<lastBuildDate>Mon, 10 May 2010 05:56:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple PHP Dates</title>
		<link>http://mattf.ca/php/simple-php-dates/</link>
		<comments>http://mattf.ca/php/simple-php-dates/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 21:10:26 +0000</pubDate>
		<dc:creator>Matt Fraser</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[php dates]]></category>
		<category><![CDATA[shotty code]]></category>

		<guid isPermaLink="false">http://mattf.ca/?p=101</guid>
		<description><![CDATA[I&#8217;ve seen people ask how to do future and past dates,  so here&#8217;s what I use.

function doDate($when, $days){
if($when=='past'){
echo date('l, F j, Y', time() - 86400 * $days);
}else if($when=='future'){
echo date('l, F j, Y', time() + 86400 * $days);
}
}
Usage: &#60;?php doDate(&#8216;[past/future]&#8216;,[number of days]); ?&#62;
Example: &#60;?php doDate(&#8216;past&#8217;,3); ?&#62;
This will show a date either in the past or future [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen people ask how to do future and past dates,  so here&#8217;s what I use.<br />
<code><br />
function doDate($when, $days){<br />
if($when=='past'){<br />
echo date('l, F j, Y', time() - 86400 * $days);<br />
}else if($when=='future'){<br />
echo date('l, F j, Y', time() + 86400 * $days);<br />
}<br />
}</code></p>
<p>Usage: &lt;?php doDate(&#8216;[past/future]&#8216;,[number of days]); ?&gt;</p>
<p>Example: &lt;?php doDate(&#8216;past&#8217;,3); ?&gt;</p>
<p>This will show a date either in the past or future for whatever days you want.</p>
<p>It gets the job done.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattf.ca/php/simple-php-dates/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
