Re: Help - Time and Date.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wow!! .. i was waiting for this. 

once more, thank you very much.

Thank You,

Reji,
PHP Developer.
==================



--- On Wed, 17/3/10, bahalul kabir <bahar_aub@xxxxxxxxx> wrote:

From: bahalul kabir <bahar_aub@xxxxxxxxx>
Subject: Re:  Help - Time and Date.
To: php-objects@xxxxxxxxxxxxxxx
Date: Wednesday, 17 March, 2010, 6:38 PM







 



  


    
      
      
      Hi,



$submitTime = mktime(0, 0, 0, 4, 0, 2010);// last day of march, return unixTimestamp

//echo strftime("last day of march: %d", $lastday);



$currentTime= time();



$diff=$submitTime - $currentTime;



if($days=intval( floor($diff/ 86400)))

    {

        $diff=$diff % 86400;

    }

    if($hours=intval( floor($diff/ 3600)))

    {

        $diff=$diff% 3600;

    }

    if($min=intval( floor($diff/ 60)))

    {

        $diff=$diff % 60;

    }

    $diff=intval( $diff);

   

    $remaining=" ";

    if($days > 0)

    {

        $remaining =$days .'d:'.$hours .'h:'.$min.' m:'.$diff .'s';

    }else if($hours > 0)

    {

        $remaining =$hours .'h:'.$min.' m:'.$diff .'s';

    }else if($min > 0)

    {

        $remaining =$min.'m:'.$ diff .'s';

    }else

    {

        $remaining =$diff .'s';

    }



echo $remaining;



Regards,

Kabir



____________ _________ _________ __

From: Reji Jayan <for_rejijayan@ yahoo.co. uk>

To: php-objects@ yahoogroups. com

Sent: Wed, March 17, 2010 1:29:23 PM

Subject:  Help - Time and Date.



Hi,



future date .. stored in db. Y-m-d H:i:s



I am in a time function,  already too lot of time making headache now, so i request you all for some help.



I need like this, x days x hrs x mins x secs remaining .. ie from the future date.



Links or code is appreciated.



Thanking you very much.



Please dont ignore this mail.



Thank You,



Reji,

PHP Developer.

============ ======



The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo. com/



[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]





    
     

    
    


 



  






      Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux