def time_in_sequence(start_tm, end_tm, cur_tm):
    """Returns true if cur_time is in the range [start, end]."""
    if end_tm == start_tm:
        return False
    elif cur_tm < end_tm and end_tm < start_tm:
        return True  # Morning.[cur].[end] [start].evening
    elif end_tm < start_tm and start_tm <= cur_tm:
        return True  # Morning.[end] [start].[cur].evening
    elif start_tm <= cur_tm and cur_tm < end_tm:
        return True  # Morning [start]..[cur].[end] evening

    return False