add X121 Content to Wokspace and Add Support for Start and Stop Time for EA and Test it ...
This commit is contained in:
@@ -7847,6 +7847,50 @@ string ToFormatString(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Specific Time in Range of another Time ...
|
||||
bool IsTimeInRange(
|
||||
datetime currentTime = NULL,
|
||||
datetime startTime = NULL,
|
||||
datetime stopTime = NULL //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
// Normallize Current Time ...
|
||||
NormalizeTime(currentTime);
|
||||
|
||||
//
|
||||
result = !IsValid(startTime) &&
|
||||
!IsValid(stopTime);
|
||||
if (result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = IsValid(startTime) &&
|
||||
IsValid(stopTime);
|
||||
if (!result)
|
||||
{
|
||||
//
|
||||
result = IsValid(startTime) &&
|
||||
currentTime >= startTime;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = currentTime >= startTime &&
|
||||
currentTime < stopTime;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Bar Times ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user