|
Posted by lvaro G. Vicario on 08/15/07 10:15
FFMG escribió:
> Given a time I want to know if it is today or yesterday, (on the
> server).
function is_yesterday($timestamp){ // NOT TESTED
$start = mktime(0, 0, 0,
date('n', time()), date('j', time()), date('Y', time()));
$end = mktime(0, 0, 0,
date('n', time()), date('j', time()), date('Y', time()));
return ($timestamp>=$start) && ($timestamp<$end)
}
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor austrohúngaro: http://www.demogracia.com
--
Navigation:
[Reply to this message]
|