<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0">
    <title>Comments for Calculating Age</title>
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age" />
    <link rel="self" type="application/atom+xml" href="http://bradchoate.com/weblog/2002/07/12/calculating-age" />
    <id>tag:bradchoate.com,2007://4-</id>
    <updated>2006-03-19T23:16:19Z</updated>
    <subtitle>The man, the legend.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type -en-trunk--20070910</generator>
 

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:112</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c112" />
    <title>Comment from notaw on 2002-07-13</title>
    <author>
        <name>notaw</name>
        <uri>http://www.notaw.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.notaw.com">
        Nice script! You wouldn't happen to be able to point me in the right direction for slightly adjusting your script to display the time that has gone by since a post was posted. <br />
Sort of like this:<br />
Posted 10hrs ago.<br />
Posted 5 mins ago etc.<br />
Any help or pointers would be appreciated.<br />
-N.]]>
    </content>
    <published>2002-07-13T13:43:52Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:114</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c114" />
    <title>Comment from Jason on 2002-07-14</title>
    <author>
        <name>Jason</name>
        <uri>http://www.purephase.org/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.purephase.org/">
        Very good idea you came up with!  I have a feeling I will be using it in about three months for pretty much the same thing.  Very cute daughter by the way.]]>
    </content>
    <published>2002-07-15T06:20:14Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:115</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c115" />
    <title>Comment from pat on 2002-07-17</title>
    <author>
        <name>pat</name>
        <uri>http://www.thebooge.ca</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.thebooge.ca">
        when i attempt to implement this script using the server date as a reference (i.e. not using the MTEntryDate tag), it always displays years, months, days, minutes and seconds regardless of how i attempt to format the date.  i would like to make this relative to my server date, but only show years, months and days.

<p>any ideas?</p>]]>
    </content>
    <published>2002-07-17T19:07:07Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:196</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c196" />
    <title>Comment from randy on 2002-08-19</title>
    <author>
        <name>randy</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        PHP Newbie - Help Needed & Appreciated.<br />
 <br />
 Where do I paste this code into my page? Is the first part that does the calculation actually  one php function? or 2? Do I need to include the php tags? <br />
 <br />
 Thanks ahead of time for your assistance.<br />
 <br />
 Keep up the good work!<br />
 wishiwasgolfing]]>
    </content>
    <published>2002-08-19T21:48:23Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:247</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c247" />
    <title>Comment from Jake on 2002-09-07</title>
    <author>
        <name>Jake</name>
        <uri>http://ill-creative.org</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://ill-creative.org">
        Do you plan to release this as a Movabletype plugin anytime soon?  I noticed you mentioned that you might... but it's been a few months since then.  The way I have my blog set up right now... (xml parsed into php) this won't work.]]>
    </content>
    <published>2002-09-07T13:47:51Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:265</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c265" />
    <title>Comment from amancay on 2002-09-14</title>
    <author>
        <name>amancay</name>
        <uri>http://amancay.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://amancay.com">
        Is there any way to include "if" commands to handle multiple authors???]]>
    </content>
    <published>2002-09-14T09:04:01Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:314</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c314" />
    <title>Comment from mike on 2002-09-30</title>
    <author>
        <name>mike</name>
        <uri>http://www.littlebluehouse.net/sophie</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.littlebluehouse.net/sophie">
        I'm very new to PHP, and I'm trying to use this tip to get my daughter's age on her blog, but the PHP parser seems to quit at the first 'greater than sign' (line 29 or so, $s_start_date > 8) and just prints the rest of the PHP on the page. I don't have access to the PHP setup as I am using a commercial ISP. I thought the PHP parser would wait until the '?>' to end the PHP lines. any help would be greatly appreciated.

<p>btw, my daughter was born 09/17/1999, very close to your daughter. And congrats on the baby boy.</p>

<p>-Mike</p>]]>
    </content>
    <published>2002-10-01T06:11:23Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:315</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c315" />
    <title>Comment from mike on 2002-09-30</title>
    <author>
        <name>mike</name>
        <uri>http://www.littlebluehouse.net/sophie</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.littlebluehouse.net/sophie">
        d'oh! I solved the problem with a .htaccess directive to look for the index.php4 file first. thanks for the great tools.]]>
    </content>
    <published>2002-10-01T06:31:43Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:328</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c328" />
    <title>Comment from Andy on 2002-10-06</title>
    <author>
        <name>Andy</name>
        <uri>http://www.google.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.google.com">
        This script doesnt seem to support dates before January 1 1970 because it implements the unix time stamp. Is this right?]]>
    </content>
    <published>2002-10-06T20:08:35Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:450</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c450" />
    <title>Comment from amancay on 2002-11-27</title>
    <author>
        <name>amancay</name>
        <uri>http://amancay.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://amancay.com">
        http://amancay.com/agenda/archives/001069.php<br />
somehow registers as 24yrs, 11mos, 30days... even though it is clearly my 25th birthday... even yesterday registered as the same age (only hours older) odd format in the calculation???

<p>btw birthdate=197711270045</p>]]>
    </content>
    <published>2002-11-27T11:27:03Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:755</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c755" />
    <title>Comment from amancay on 2003-02-19</title>
    <author>
        <name>amancay</name>
        <uri>http://amancay.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://amancay.com">
        woo hoo! It works perfectly (as far as I can tell) now!<br />
Great job on follow-up, Brad!]]>
    </content>
    <published>2003-02-19T22:58:51Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:782</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c782" />
    <title>Comment from Eric on 2003-02-23</title>
    <author>
        <name>Eric</name>
        <uri>http://www.google.com/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.google.com/">
        I tried to use this for my daughter's blog, but when it got to 13 days using this:

<p></p>

<p>The output was this:</p>

<p>I'm 1 year, 12 months, 11 days old today!</p>

<p>Clearly a bug with crossing a month boundary .. I don't have time to track it down at the moment, but it seems related to having the month and year be 

<p>Eric<br />
</p>]]></p>
    </content>
    <published>2003-02-23T23:36:14Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:783</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c783" />
    <title>Comment from Eric on 2003-02-23</title>
    <author>
        <name>Eric</name>
        <uri>http://www.google.com/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.google.com/">
        Ok, so putting in PHP code doesn't work in this form.  The input was 20030119 for the start date and 20030201 for the end date.  It will spit out incorrect info even if you hardcode this into a PHP page, (i.e. not just when you run it through an MT template).

<p>Output is as described in the previous comment.</p>

<p>best, Eric</p>]]>
    </content>
    <published>2003-02-23T23:38:29Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:982</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c982" />
    <title>Comment from Scott Genevish on 2003-05-03</title>
    <author>
        <name>Scott Genevish</name>
        <uri>http://www.genevish.org/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.genevish.org/">
        The second line of the calculate_age function needs to be changed to:

<p>$b_show_time = strlen($s_start_date) > 8;</p>

<p>...otherwise it will always show hours, minutes and seconds, and incorrectly at that.</p>]]>
    </content>
    <published>2003-05-04T05:57:58Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:988</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c988" />
    <title>Comment from Eduardo Valdes on 2003-05-05</title>
    <author>
        <name>Eduardo Valdes</name>
        <uri>http://www.activenodes.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.activenodes.com">
        Thanks for your work.<br />
If it's already known that this script doesn't work for dates before 1970, could you --please-- give some clue of how to solve that problem?]]>
    </content>
    <published>2003-05-05T20:02:56Z</published>
</entry>

<entry>
    <id>tag:bradchoate.com,2002://4.669-comment:1249</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#c1249" />
    <title>Comment from hari on 2003-06-25</title>
    <author>
        <name>hari</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        Sir, i want a simple program of how to get the date of birth from the Microsoft Acess database and calculate the date of birth with the present date ....

<p>if u can do this favour it would be great <br />
please show an example..</p>

<p>Thanking you</p>]]>
    </content>
    <published>2003-06-25T11:13:37Z</published>
</entry>


<entry>
    <id>tag:bradchoate.com,2002://4.669-ping:95</id>
    <thr:in-reply-to ref="tag:bradchoate.com,2002://4.669" href="http://bradchoate.com/weblog/2002/07/12/calculating-age"/>
 
    <link rel="alternate" type="text/html" href="http://bradchoate.com/weblog/2002/07/12/calculating-age#p95" />
    <title>changing things up</title>
    <author>
        <name>lily of the valley</name>
        <uri>http://amancay.com/agenda/archives/000815.php</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://amancay.com/agenda/archives/000815.php">
        autumn cleaning around here (ok, so I admit I broke out an actual vacuum the other day... but this is another story!)
    </content>
    <published>2002-10-14T23:46:53Z</published>
</entry>

</feed>