
TheGame+
Deleted
May 19, 2000, 7:08 AM
Post #2 of 2
(339 views)
|
|
Re: Time comparison and cookies
[In reply to]
|
Can't Post
|
|
The easiest way would probably be to use the time since the epoch = the value returned by the time() function. After that, you can use simple math to compare them : <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> if ($cookie{'lastvisit'} < time - 5*24*3600) {...}</pre><HR></BLOCKQUOTE> Or use standard functions to extract dates etc. : <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> print "Your last visit was on ", scalar localtime($cookie{'lastvisit'}), "\n";</pre><HR></BLOCKQUOTE>
|