Checks if the chosen machine_name exists or not.
function system_date_format_exists($candidate_machine_name) { if ($formats = system_get_date_formats()) { return array_key_exists($candidate_machine_name, $formats); } return FALSE; }