/** * @see \wcf\system\template\IModifierTemplatePlugin::execute() */ public function execute($tagArgs, TemplateEngine $tplObj) { if (!isset($tagArgs[1])) { $tagArgs[1] = TIME_NOW; } $fullInterval = false; if (isset($tagArgs[2])) { $fullInterval = $tagArgs[2]; } $startTime = DateUtil::getDateTimeByTimestamp($tagArgs[1]); $endTime = DateUtil::getDateTimeByTimestamp($tagArgs[0]); return DateUtil::formatInterval($endTime->diff($startTime), $fullInterval); }