시점 비교

시점이 다른 시점의 이전, 이후인지 또는 이와 동일한 시간인지 확인합니다.

다음 연산자를 사용하여 시점을 비교할 수 있습니다.
  • is after 및 is after or the same as.
  • is before 및 is before or the same as.
  • is at the same time as.

예: the arrival time of 'the first flight' is before the departure time of 'the second flight'.

다음 규칙은 첫 번째 항공편 도착 및 두 번째 항공편 출발 이전에 최소한 한 시간이 있는지 확인합니다.

definitions
    set 'flight1' to a flight in the flights of 'the customer'; 
    set 'flight2' to a flight in the flights of 'the customer' 
        where the scheduled departure time of this flight is after the scheduled arrival time of 'flight1';
if    the scheduled departure time of 'flight2' is before 1 hour after the scheduled arrival time of 'flight1'
then    print "Less than 1 hour of transit time";

시점 및 당일 시간 비교

시간대 정보는 시점에 저장되어 있습니다. 예를 들어, 이벤트에서 시간대 정보는 시간소인에 있습니다.

다음 규칙은 구매 이벤트가 이벤트가 발생하는 시간대의 오후에 발생했는지 여부를 확인합니다.

when a purchase event occurs
    where the time of day of this purchase event is after or the same as 12:00 PM
then    print "Afternoon purchase.";

시간 인스턴트 비교

다음 규칙은 해당 시간대와는 무관하게 두 시점의 시간 인스턴트를 비교합니다.

when a flight departure event occurs
    where this flight departure event is after the scheduled departure time of 'the flight'
then    print "The flight's departure was late";
다음 규칙은 항공편 출발이 스케줄된 출발 시간와 정확히 동일한 시간인지 확인합니다.
중요사항: is at the same time as 연산자는 초 단위로 다운된 시간 인스턴트를 확인합니다. 시간이 정확한 초 단위와 동일하지 않은 경우, 규칙은 false를 리턴합니다.
when a flight departure event occurs
    where this flight departure event is at the same time as the scheduled departure time of 'the flight'
then    print "The flight departed on time";

이벤트 비교

다음 규칙은 가방이 항공기에 적재된 후에 항공편의 재스케줄링이 발생하는지 여부를 확인합니다.

when a flight rescheduled event has occurred 5 minutes ago, called 'the flight rescheduled'
definitions
    set 'the bag loaded' to a bag loaded event;
if    'the flight rescheduled' is after 'the bag loaded'
then    print "The flight is rescheduled, please unload the bags from the plane";