Messed around with the dates the other day. I didn't like seeing just the vanilla date, and wanted something a little more. After looking around, I found <a href="http://www.rattledbaby.com/archives/000244.php">some interesting options</a> that have already been implemented by people.
I found <a href="http://blog.natbat.co.uk/archive/2003/Jun/14/time_since">NatBat's method</a> to work just about like I want it. And it seems the code is easy enough to monkey with, so I'll probably try and do that later.
My biggest problem is I was having a braindump yesterday on how to get the MT variables read into PHP. Then I remembered that the CGI is parsed <em>before</em> the PHP, so all I had to do was escape the characters. <? echo time_since('<$MTEntryDate format="%x"$>'); ?> worked just great.
UPDATE: Something is goofy. The time countdown isn't working too terribly great, it's off somehow. I'll be looking more into it this weekend.
Tagged As MT
Comments are Open (0)
Posted at 07:11 AM