|
Posted by Rik on 08/15/07 10:26
On Wed, 15 Aug 2007 12:23:52 +0200, gosha bine <stereofrog@gmail.com> =
wrote:
> On 15.08.2007 11:57 FFMG wrote:
>> Hi, Given a time I want to know if it is today or yesterday, (on the=
>> server).
>> I cannot use time difference because if I log the time and it is 23:=
59
>> and I check again at 24:01 then the earlier time is, in fact,
>> yesterday.
>> so given time $a and time $b how can I calculate if $a is the day
>> before $b?
>>
>
> if(unixtojd($b) - unixtojd($a) =3D=3D 1)
>
> http://www.php.net/manual/en/function.unixtojd.php
Erm, Julian days start at noon?
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|