fix cs
remove some unused blocks
return empty value instead of throwing an exception for format_date
smarty function