기간 비교
기간은 다른 기간 이전 또는 이후이거나 이와 겹칠 수 있습니다. 두 기간의 지속 기간을 비교할 수도 있습니다.
다음 연산자를 사용하여 기간의 순서를 비교할 수 있습니다.
- is before
예: 'the exceptional promotion period' is before 'the flight period'
- is after
예: 'the exceptional promotion period' is after 'the flight period'
- overlaps with
예: 'the exceptional promotion period' overlaps with 'the flight period'
기간에 다른 기간이 포함되거나 기간이 다른 기간 중에 있는 경우에는 일부 겹치는 경우가 발생할 수 있습니다.
- is during the same time as
이 연산자는 두 기간에 정확히 동일한 시작 시간 및 동일한 종료 시간이 있음을 확인합니다. 예: 'the exceptional promotion period' is during the same time as 'the flight period'
한 기간이 다른 기간과 동일한 시간에 시작되거나 종료될 수도 있습니다.
다음 규칙은 두 비즈니스 여행이 겹치는지 여부를 확인합니다.
definitions
set 'Trip1' to a trip in the trips of 'the customer';
set 'Trip2' to a trip in the trips of 'the customer';
set 'the first trip' to the period between the start of 'Trip1' and the end of 'Trip1';
set 'the second trip' to the period between the start of 'Trip2' and the end of 'Trip2';
if 'the first trip' overlaps with 'the second trip'
then print "overbooked travel agenda";
다른 기간보다 짧거나 긴 기간
다음 연산자를 사용하여 다른 기간과 비교되는 한 기간의 지속 기간을 확인할 수 있습니다.
- is shorter than 및 is shorter than or equal to
예: 'the flight period' is shorter than 'the trip period'
- is longer than 및 is longer than or equal to
예: 'the trip period' is longer than or equal to 'the flight period'