from datetime import datetime


def format_ISO8601(moment: datetime) -> str:
    """Format a datetime into a filename compatible IS8601 representation.

    Args:
        moment: A datetime.

    Returns:
        The ISO8601 datetime formatted with hyphens as seperators.

    Examples:
        >>> from datetime import datetime
        >>> format_ISO8601(datetime(2018, 2, 23, 12, 13, 38))
        '2018-02-23T12-13-38'

    """
    return moment.strftime('%Y-%m-%dT%H-%M-%S')