26 $time = $this->time ?? new \DateTime();
29 $time->modify($modifier);
44 $this->time = clone
$time;
setCurrentTime(?\DateTime $time=null)
Set the current time.
resetCurrentTime()
Reset the current time Use after the time has been set with setCurrentTime and it no longer needs to ...
getCurrentTime($modifier='')
Get the (cloned) time.
trait TimeUsing
Adds methods for setting the current time (for testing)
if(! $annotation instanceof ElggAnnotation) $time
Extension of the DateTime class to support formatting a date using the locale.