--- date_api.module 2009-03-01 17:35:21.000000000 -0500 +++ date_api.module.new 2009-03-02 06:34:05.000000000 -0500 @@ -1546,7 +1546,7 @@ function date_limit_format($format, $gra // After removing the non-desired parts of the format, test if the only // things left are escaped, non-date, characters. If so, return nothing. - if (!$test = preg_replace('(\\\\\w{1})', '', $format)) { + if (!$test = trim(preg_replace('(\\\\\w{1})', '', $format))) { return ''; } return $format; @@ -2394,4 +2394,4 @@ function date_range_string($years) { $max = '+'. ($years[1] - $this_year); } return $min .':'. $max; -} \ No newline at end of file +}