def __format_datetime_input(datetime_input, language):
    """Formats the specified datetime input.

    Args:
        datetime_input (dict): A datetime input configuration to format.
        language (dict): A language configuration used to help format the input configuration.

    Returns:
        dict: A formatted datetime input configuration.
    """
    for key in ["date-format", "time-format"]:
        value = datetime_input.get(key)
        if value is not None:
            datetime_input[key] = value.strip()

    return datetime_input