note 55348 deleted from function.strtotime by derick

From: Date: Sat, 08 Oct 2005 12:57:30 +0000
Subject: note 55348 deleted from function.strtotime by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96673@lists.php.net to get a copy of this message
Note Submitter: caleb at isledining dot com ---- Pre 1969 Date Issue I had to have a work out a solution for this issue and so i wrote this function it works great and is pretty short and simple. hope its found useful. <? function calcdate($date){ // Day Month Year, Leave Blank If Date Is 0000-00-00! $dateArr = explode("-", $date); if($dateArr[2] != "00"){ echo "$dateArr[2] "; if ($dateArr[1] == "01"){echo "January";}if ($dateArr[1] == "02"){echo "February";} if ($dateArr[1] == "03"){echo "March";}if ($dateArr[1] == "04"){echo "April";} if ($dateArr[1] == "05"){echo "May";}if ($dateArr[1] == "06"){echo "June";} if ($dateArr[1] == "07"){echo "July";}if ($dateArr[1] == "08"){echo "August";} if ($dateArr[1] == "09"){echo "September";}if ($dateArr[1] == "10"){echo "October";} if ($dateArr[1] == "11"){echo "November";}if ($dateArr[1] == "12"){echo "December";} echo " $dateArr[0]"; }} ?>

« previous php.notes (#96673) next »