import calendar


def date_format(date_ymd: str) -> str:
    """Convert date to IMAP SEARCH Command acceptable format.

    Args:
        date_ymd (str): The date in `YYYY-MM-DD` format.

    Returns:
        str: The date in `DD-MM-YYYY` format and the month replaced with its
            abbreviated form.
    """
    date = date_ymd.split("-")[::-1]
    return f"{date[0]}-{calendar.month_abbr[int(date[1])]}-{date[2]}"