. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Statistics\Repository; use Carbon\Carbon; use Fisharebest\Webtrees\Functions\FunctionsDate; 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 I18N::localTime(Carbon::now(), $format); } /** * @inheritDoc */ public function browserTime(): string { $format = strtr(I18N::timeFormat(), ['%' => '']); return I18N::localTime(Carbon::now(), $format); } /** * @inheritDoc */ public function browserTimezone(): string { return I18N::localTime(Carbon::now(), 'T'); } }