note 51911 rejected from ref.datetime by nlopess

From: Date: Thu, 14 Apr 2005 20:31:14 +0000
Subject: note 51911 rejected from ref.datetime by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-88031@lists.php.net to get a copy of this message
Note Submitter: xavier at sunglowal dot com ---- This is my function that converts dates to string format 'yyyymmdd': <?php function date_to_text($str_input) { if (!is_string($str_input)) { return false; } else { $str_output = date("Ymd", strtotime($str_input)); return $str_output; } } ?> Anyone can improve it checking if $str_input it's a Gregorian valid date?

« previous php.notes (#88031) next »