note 22175 deleted from function.strftime by sniper

From: Date: Tue, 28 Jan 2003 16:27:27 +0000
Subject: note 22175 deleted from function.strftime by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-42936@lists.php.net to get a copy of this message
//I needed the $end_date for an interval of $nights with a set $date_begin, in format 2002-06-01. it took me a long time to work this out for whom it could be usefull $date_begin = explode("-", $date);//$date is the date the user entered list($year, $month, $day) = $date_begin; $end_date = strftime("%Y-%m-%d", mktime(0,0,0,$month,$day+$nights,$year));//$nights being the interval echo "begin date $date_begin to $end_date";

« previous php.notes (#42936) next »