def check_start_or_end(dates, today):
    """
    Function:
        check_start_or_end
    Description:
        checks if given date starts or ends today
    Input:
        - dates - a list containing start and end date (strings) for an event
        - today - today's date (string)
    Output:
        - 0 if no event starts or ends today
        - 1 if event starts and ends today
        - 2 if event starts today and ends on a later date
        - 3 if event started on a previous date and ends today
    """
    if today == dates[0]:
        if today == dates[1]:
            return 1
        else:
            return 2
    elif today == dates[1]:
        return 3
    else:
        return 0