<?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: PHP Get Age Function</title>
	<atom:link href="http://trevordavis.net/blog/tutorial/get-age-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevordavis.net/blog/tutorial/get-age-function/</link>
	<description>Doing That Web Standards Thing</description>
	<lastBuildDate>Thu, 11 Mar 2010 01:37:28 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: How to take out user's AGE in PHP? - DesignersTalk</title>
		<link>http://trevordavis.net/blog/tutorial/get-age-function/#comment-1643</link>
		<dc:creator>How to take out user's AGE in PHP? - DesignersTalk</dc:creator>
		<pubDate>Fri, 12 Sep 2008 21:19:47 +0000</pubDate>
		<guid isPermaLink="false">http://trevordavis.net/blog/tutorial/php-get-age-function/#comment-1643</guid>
		<description>[...] this PHP Get Age Function &#124; Trevor Davis  My-PHP.tk &bull;&bull;&bull; Your Free PHP Resource! &bull;&bull;&bull;  [...]</description>
		<content:encoded><![CDATA[<p>[...] this PHP Get Age Function | Trevor Davis  My-PHP.tk &amp;bull;&amp;bull;&amp;bull; Your Free PHP Resource! &amp;bull;&amp;bull;&amp;bull;  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Pennell</title>
		<link>http://trevordavis.net/blog/tutorial/get-age-function/#comment-947</link>
		<dc:creator>Matthew Pennell</dc:creator>
		<pubDate>Sat, 21 Jun 2008 14:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://trevordavis.net/blog/tutorial/php-get-age-function/#comment-947</guid>
		<description>Sorry for the much delayed comment, but how about this much simpler solution:

echo intval((time() - strtotime(&#039;14-01-1978&#039;)) / 31557600);

It will tick over at some point during the day of your birthday, as it uses an approximation of a year (365.25 days to represent a partial leap-year).</description>
		<content:encoded><![CDATA[<p>Sorry for the much delayed comment, but how about this much simpler solution:</p>
<p>echo intval((time() &#8211; strtotime(&#8216;14-01-1978&#8242;)) / 31557600);</p>
<p>It will tick over at some point during the day of your birthday, as it uses an approximation of a year (365.25 days to represent a partial leap-year).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sony AK</title>
		<link>http://trevordavis.net/blog/tutorial/get-age-function/#comment-942</link>
		<dc:creator>Sony AK</dc:creator>
		<pubDate>Thu, 19 Jun 2008 07:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://trevordavis.net/blog/tutorial/php-get-age-function/#comment-942</guid>
		<description>Great post :) i&#039;m using it :)</description>
		<content:encoded><![CDATA[<p>Great post :) i&#8217;m using it :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaimite</title>
		<link>http://trevordavis.net/blog/tutorial/get-age-function/#comment-587</link>
		<dc:creator>Kaimite</dc:creator>
		<pubDate>Mon, 10 Mar 2008 10:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://trevordavis.net/blog/tutorial/php-get-age-function/#comment-587</guid>
		<description>Hello : 

Here is 2 suggestions : 

&lt;pre&gt;&lt;code&gt;function age2($bDate) {
	list($bYear, $bMonth, $bDay) = explode(&quot;-&quot;, $bDate);
	list($cYear, $cMonth, $cDay) = explode(&quot;-&quot;, date(&quot;Y-m-d&quot;));
	return ( ($cMonth &gt;= $bMonth &amp;&amp; $cDay &gt;= $bDay) &#124;&#124; ($cMonth &gt; $bMonth) ) ? $cYear - $bYear : $cYear - $bYear - 1;
}

echo age2(&quot;1978-01-14&quot;);&lt;/code&gt;&lt;/pre&gt;

OR 

&lt;pre&gt;&lt;code&gt;function age2($bMonth,$bDay,$bYear) {
	list($cYear, $cMonth, $cDay) = explode(&quot;-&quot;, date(&quot;Y-m-d&quot;));
	return ( ($cMonth &gt;= $bMonth &amp;&amp; $cDay &gt;= $bDay) &#124;&#124; ($cMonth &gt; $bMonth) ) ? $cYear - $bYear : $cYear - $bYear - 1;
}

echo age2(1,14,1978);&lt;/code&gt;&lt;/pre&gt;

See you.

Kaimite</description>
		<content:encoded><![CDATA[<p>Hello : </p>
<p>Here is 2 suggestions : </p>
<pre><code>function age2($bDate) {
	list($bYear, $bMonth, $bDay) = explode("-", $bDate);
	list($cYear, $cMonth, $cDay) = explode("-", date("Y-m-d"));
	return ( ($cMonth &gt;= $bMonth &amp;&amp; $cDay &gt;= $bDay) || ($cMonth &gt; $bMonth) ) ? $cYear - $bYear : $cYear - $bYear - 1;
}

echo age2("1978-01-14");</code></pre>
<p>OR </p>
<pre><code>function age2($bMonth,$bDay,$bYear) {
	list($cYear, $cMonth, $cDay) = explode("-", date("Y-m-d"));
	return ( ($cMonth &gt;= $bMonth &amp;&amp; $cDay &gt;= $bDay) || ($cMonth &gt; $bMonth) ) ? $cYear - $bYear : $cYear - $bYear - 1;
}

echo age2(1,14,1978);</code></pre>
<p>See you.</p>
<p>Kaimite</p>
]]></content:encoded>
	</item>
</channel>
</rss>
