From 0a8c4bedbfa986222506946fb696d99982979ccf Mon Sep 17 00:00:00 2001 From: Daniel Waxweiler Date: Sun, 7 May 2023 22:19:47 +0200 Subject: [PATCH] harmonise namespace --- source/includes/date-time-wrapper.php | 14 ++++++++++---- source/includes/formatter.php | 7 +++++++ source/view/events-list-group-not-found.php | 2 ++ source/view/events-list-not-loaded.php | 2 ++ source/view/events-list-widget/form.php | 2 ++ source/view/events-list.php | 2 ++ .../settings/is-short-offset-name-shown-field.php | 2 ++ source/view/settings/page.php | 2 ++ source/view/settings/url-field.php | 2 ++ 9 files changed, 31 insertions(+), 4 deletions(-) diff --git a/source/includes/date-time-wrapper.php b/source/includes/date-time-wrapper.php index faa6c79..2ffb03d 100644 --- a/source/includes/date-time-wrapper.php +++ b/source/includes/date-time-wrapper.php @@ -1,4 +1,10 @@ dateTime = new DateTime($text); + $this->dateTime = new \DateTime($text); $this->locale = $locale; - $this->timeZone = new DateTimeZone($timeZone); + $this->timeZone = new \DateTimeZone($timeZone); } public function getShortDate(): string { - $formatter = IntlDateFormatter::create($this->locale, IntlDateFormatter::SHORT, IntlDateFormatter::NONE, $this->timeZone); + $formatter = \IntlDateFormatter::create($this->locale, \IntlDateFormatter::SHORT, \IntlDateFormatter::NONE, $this->timeZone); return $formatter->format($this->dateTime); } @@ -27,7 +33,7 @@ final class DateTimeWrapper { } public function get24Time(): string { - $formatter = IntlDateFormatter::create($this->locale, IntlDateFormatter::NONE, IntlDateFormatter::SHORT, $this->timeZone); + $formatter = \IntlDateFormatter::create($this->locale, \IntlDateFormatter::NONE, \IntlDateFormatter::SHORT, $this->timeZone); return $formatter->format($this->dateTime); } } diff --git a/source/includes/formatter.php b/source/includes/formatter.php index 1190d34..bff30c9 100644 --- a/source/includes/formatter.php +++ b/source/includes/formatter.php @@ -1,4 +1,11 @@