I am having a little trouble thinking this morning. Suppose I just want to
know how many full days have elapsed since October 21, 2006.

$then = mktime(0,0,0,10,21,2006);
$now = time();
$days = floor(($now-$then)/86400);

echo "$days days since 2006-10-21";

Anyone see anything wrong with my reasoning here? This happens to straddle
a seasonal time change, but as I see it, that doesn't matter.

Thanks

---
David Mintz
http://davidmintz.org/

En Nueva York el tr?nsito de la belleza a la desolaci?n sucede
siempre expeditivamente, como si el principio universal
de m?xima eficiencia hubiera aconsejado la supresi?n de
gradaciones intermedias.

  -- Antonio Mu?oz Molina, Ventanas de Manhattan


_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to