def get_date(isoformattime: str) -> str:
    """Extract {YYYY-MM-DD} from ISO 8601 formatted time string.
    
    Parameters
    ----------
    `isoformattime`: `str`\n
    An ISO 8601 formatted time string.

    Returns
    -------
    `str`\n
    A string containing the date portion of the original time string.

    Raises
    ------
    `ValueError`\n
    If the 'T' prefacing the time part of the string is missing.
    """
    T_index = isoformattime.find('T')
    if T_index == -1:
        raise ValueError('Improperly formatted time string given.')
    date = isoformattime[0: T_index]
    return date