Re: Comparing two dates.. Which is the older one?
| From: | Phillip Bow | Date: | Tue, 20 Mar 2001 23:35:49 +0000 |
| Subject: | Re: Comparing two dates.. Which is the older one? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44848@lists.php.net to get a copy of this message | ||
Depending on what sort of timestamp you are getting you should be able to
just do:
if ($loggtime > $oldLoggtime) then...
With just a straight unix timestamp(via mktime();) this would work fine.
--
phill
""Richard"" <oblivion@lunamorena.net> wrote in message
news:998o75$aol$1@toye.p.sourceforge.net...
> Greetings.
>
> (yes.. I am active)
>
> When a user loggs on, I pass the string $loggtime, that is written to
a
> file. Whenever a this user refreshes any of the pages, certain tasks are
> performed, and a file's contents is checked, (which contents is a single
> line of time). If the $loggtime is newer, nothing would happen, but if the
> $loggtime is older than what is written in the file, something should
> happen. Any ideas of how I can compare two dates?
>
> - Richard
>
>
> ps: to all who wonders, I am writing a really small community. Now, this
> question is related whenever a new message is sent.. The message is
written
> to a file, and I check that file everytime a site is refreshed. The file
is
> arrayed with "|" as a separator. :Ds
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>