mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
add list of task
This commit is contained in:
@@ -142,6 +142,28 @@ class SingleTask extends AbstractTask
|
||||
return $this->warningInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Warning date, computed from the difference between the
|
||||
* end date and the warning interval
|
||||
*
|
||||
* Return null if warningDate or endDate is null
|
||||
*
|
||||
* @return \DateTimeImmutable
|
||||
*/
|
||||
public function getWarningDate()
|
||||
{
|
||||
if ($this->getWarningInterval() === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($this->getEndDate() === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return \DateTimeImmutable::createFromMutable($this->getEndDate())
|
||||
->sub($this->getWarningInterval());
|
||||
}
|
||||
|
||||
function getRecurringTask(): RecurringTask
|
||||
{
|
||||
return $this->recurringTask;
|
||||
|
Reference in New Issue
Block a user