Fixed checking if date exists in key name

It was assuming len(name_parts) >= 3