Quintiq file version 2.0
|
#parent: #root
|
Function CalcIsModified
|
{
|
TextBody:
|
[*
|
isModified := false;
|
participation := this.Participation();
|
timezone := this.Calendar().astype( LibCal_Calendar ).GetTimeZone();
|
|
if( participation.IsLeading() )
|
{
|
event := participation.Event();
|
isMoved24Hours := this.InitialStart().IsFinite() // Ignore 'old' intervals that don't have an initial start registered.
|
and this.Start() <> this.InitialStart()
|
and ( this.Start() - this.InitialStart() ).HoursAsReal() mod 24 = 0;
|
|
isModified := this.Start().TimeOfDay( timezone ) <> event.StartTimeOfDay()
|
or this.End(). TimeOfDay( timezone ) <> event.EndTimeOfDay()
|
or isMoved24Hours // To detect a move or change in duration of a multitude of 24 hours,
|
or ( this.End() - this.Start() ) <> event.Duration(); // because in that case the TimesOfDay or not changed.
|
}
|
else
|
{
|
// For a subscribingETI, take over the value from the LeadingETI.
|
isModified := this.LeadingETI().IsModified();
|
}
|
|
this.IsModified( isModified );
|
*]
|
InterfaceProperties { Accessibility: 'Module' }
|
}
|