def format_day(dt, fmt = None):
    """
    Returns the formatted date truncated to the day.
    The format is optional and defaults to the first registered date format.
    """
    return dt.strftime(fmt or "%Y-%m-%d")