Quintiq file version 2.0
|
#parent: #root
|
StaticMethod GetInfoNonRecurring (
|
Date startDate_i,
|
Duration startTimeOfDay_i,
|
Date endDate_i,
|
Duration endTimeOfDay_i,
|
TimeZone timezone_i,
|
Duration duration_i
|
) const declarative remote as String
|
{
|
Description:
|
[*
|
Get information about the Participation in textual format.
|
Is implemented as a static method so it can also be called from the UI when there is no instance available yet.
|
*]
|
TextBody:
|
[*
|
value := "";
|
convOps := ConversionOptions::ISO();
|
|
// No RecurrencePattern, only from and to.
|
// Format depending on whether the participation is on one day or not.
|
// Show the info using the timezone of the calendar instead of in GMT.
|
startTime := LibCal_Util::CalculateStartTime( timezone_i, startDate_i, startTimeOfDay_i );
|
startDate := startTime.Date( timezone_i );
|
startTimeOfDay := startTime.TimeOfDay( timezone_i );
|
|
endTime := LibCal_Util::CalculateEndTime( timezone_i, startDate_i, startTimeOfDay_i, duration_i );
|
endDate := endTime .Date( timezone_i );
|
endTimeOfDay := endTime .TimeOfDay( timezone_i );
|
|
if( endDate_i = startDate_i )
|
{
|
value := startDate.Format( "dd D-MM-Y" )
|
+ " from " + startTimeOfDay.Format( "H:m", convOps )
|
+ " to " + endTimeOfDay .Format( "H:m", convOps );
|
}
|
else
|
{
|
value := "from " + startDate.Format( "dd D2-MM-Y", convOps ) + startTimeOfDay.Format( " H:m", convOps )
|
+ " to " + endDate .Format( "dd D2-MM-Y", convOps ) + endTimeOfDay .Format( " H:m", convOps );
|
}
|
|
return value;
|
*]
|
}
|