Zeiträume vergleichen
Ein Zeitraum kann vor einem anderen Zeitraum bzw. nach einem anderen Zeitraum liegen und Zeiträume können einander überlappen. Sie können auch die Dauer zweier Zeiträume vergleichen.
- is before
Beispiel: 'the exceptional promotion period' is before 'the flight period'
- is after
Beispiel: 'the exceptional promotion period' is after 'the flight period'
- overlaps with
Beispiel: 'the exceptional promotion period' overlaps with 'the flight period'
Zu Überlappungen kann es kommen, wenn ein Zeitraum einen anderen Zeitraum enthält bzw. wenn ein Zeitraum während eines anderen Zeitraums stattfindet.
- is during the same time as
Dieser Operator prüft, ob zwei Zeiträume exakt dieselbe Start- und Endzeit haben. Beispiel: 'the exceptional promotion period' is during the same time as 'the flight period'
Ein Zeitraum kann zur selben Zeit starten oder enden wie ein anderer Zeitraum.
Die folgende Regel prüft, ob zwei Geschäftsreisen einander überlappen:
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";
Vergleichen, ob ein Zeitraum kürzer oder länger als ein anderer Zeitraum ist
- is shorter than und is shorter than or equal to
Beispiel: 'the flight period' is shorter than 'the trip period'
- is longer than und is longer than or equal to
Beispiel: 'the trip period' is longer than or equal to 'the flight period'