|
Posted by Toby A Inkster on 08/15/07 18:45
Rik wrote:
> function is_today($timestamp){
> return date('d',$timestamp) == date('d');
> }
The following will return TRUE:
is_today(strtotime('15 Feb 1986'));
Better would be:
function is_today ($ts)
{ return date('Ymd',$ts)==date('Ymd'); }
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 55 days, 22:22.]
Fake Steve is Dead; Long Live Fake Bob!
http://tobyinkster.co.uk/blog/2007/08/13/fake-bob/
Navigation:
[Reply to this message]
|