| // +----------------------------------------------------------------------+ // // $Id$ /** * Replace idate() * * @category PHP * @package PHP_Compat * @link http://php.net/idate * @author Arpad Ray * @version $Revision: 1.2 $ * @since PHP 5.0.0 * @require PHP 4.0.0 (user_error) */ if (!function_exists('idate')) { function idate($format, $timestamp = false) { if (strlen($format) !== 1) { user_error('idate format is one char', E_USER_WARNING); return false; } if (strpos('BdhHiILmstUwWyYzZ', $format) === false) { return 0; } if ($timestamp === false) { $timestamp = time(); } return intval(date($format, $timestamp)); } } ?>