|
Posted by gosha bine on 08/15/07 10:41
On 15.08.2007 12:26 Rik wrote:
> 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) == 1)
>>
>> http://www.php.net/manual/en/function.unixtojd.php
>
>
> Erm, Julian days start at noon?
Don't trust every comment you see in the manual. ;)
--
gosha bine
makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi
Navigation:
[Reply to this message]
|