This feels unsafe. I think we should use `date_to_string()` here too. That way we're using the same function in both places.