def get_day_suffix(day):
    """
    Returns the suffix of the day, such as in 1st, 2nd, ...
    """
    if day in (1, 21, 31):
        return 'st'
    elif day in (2, 12, 22):
        return 'nd'
    elif day in (3, 23):
        return 'rd'
    else:
        return 'th'