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 @@