Re: HELP!!! Date time problems!!!!

From: Date: Thu, 08 Mar 2001 23:42:21 +0000
Subject: Re: HELP!!! Date time problems!!!!
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-43089@lists.php.net to get a copy of this message
upss sorry couldnt see your latest post. thx anywy :)))))) ""karakedi"" <eyilmaz76@ultratv.net> wrote in message news:98942f$qcd$1@toye.p.sourceforge.net... > ok here is the right one working : smt was wrong with the arrays i beleive : > > <?php > > > // ===================================================== > // This function returns the difference between a dates > // and the current date. > // arg1: separator > // arg2: startdate date dd mm yyyy > // return number of days of differences > // ====================================================== > function diff_date( $sep, $startdate ){ > // Date of file in database > $startdate = explode( "$sep", $startdate ); > $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[0], > $startdate[2] ); > // Now > $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") ); > // get difference in days by dividing by 24*60*60 > return ( $enddate - $startdate ) / ( 86400 ); > } // end function > > echo diff_date("/", "05/3/2001") ; > > ?> > > > this one works :) > > > > > -- > 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 >

« previous php.general (#43089) next »