. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Statistics\Repository; use Fisharebest\Webtrees\Carbon; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Statistics\Repository\Interfaces\BrowserRepositoryInterface; /** * A repository providing methods for browser related statistics. */ class BrowserRepository implements BrowserRepositoryInterface { /** * @inheritDoc */ public function browserDate(): string { $format = strtr(I18N::dateFormat(), ['%' => '']); return Carbon::now()->local()->format($format); } /** * @inheritDoc */ public function browserTime(): string { $format = strtr(I18N::timeFormat(), ['%' => '']); return Carbon::now()->local()->format($format); } /** * @inheritDoc */ public function browserTimezone(): string { return Carbon::now()->local()->format('T'); } }