|
Posted by Philip Ronan on 10/23/37 11:34
"Mike" wrote:
> This is a little snippet from the calendar recipe 3.17. I dont understand
> what the $yesterday and $day_secs are for?
> $yesterday = time() - 86400;
time() is the current time in seconds. If you subtract 86400 from that, you
get the same time on the previous day (Hint: 86400 = 24 x 3600)
> $day_secs = mktime(0, 0, 0, $month, $day, $year);
Uhm, you *are* aware that the PHP documentation is all available online,
aren't you? If you visit <http://php.net/mktime> and read what's there, then
it should become fairly obvious what this means.
--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
[Back to original message]
|