]> git.mxchange.org Git - friendica.git/commitdiff
Move L10n::getDay() calls to DI::l10n()->getDay() calls
authornupplaPhil <admin@philipp.info>
Sat, 18 Jan 2020 19:54:46 +0000 (20:54 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 19 Jan 2020 15:31:18 +0000 (16:31 +0100)
src/Content/Widget.php
src/Model/Event.php
src/Model/Profile.php
src/Util/Temporal.php

index 496bbfcb68f4a4d9e9d3ba7b2f0748c9b8979401..2052d216d2040b07b3dfd3890c5d340e0e6b436a 100644 (file)
@@ -476,7 +476,7 @@ class Widget
                                $dend = substr($dnow, 0, 8) . Temporal::getDaysInMonth(intval($dnow), intval(substr($dnow, 5)));
                                $start_month = DateTimeFormat::utc($dstart, 'Y-m-d');
                                $end_month = DateTimeFormat::utc($dend, 'Y-m-d');
-                               $str = L10n::getDay(DateTimeFormat::utc($dnow, 'F'));
+                               $str = DI::l10n()->getDay(DateTimeFormat::utc($dnow, 'F'));
 
                                if (empty($ret[$dyear])) {
                                        $ret[$dyear] = [];
index 6f309a3397594479075c49d13f30ee4ea05c25d2..e5932e7c1d9cd43b3589a77b7757691f5b7af8e3 100644 (file)
@@ -33,13 +33,13 @@ class Event
 
                $bd_format = DI::l10n()->t('l F d, Y \@ g:i A'); // Friday January 18, 2011 @ 8 AM.
 
-               $event_start = L10n::getDay(
+               $event_start = DI::l10n()->getDay(
                        !empty($event['adjust']) ?
                        DateTimeFormat::local($event['start'], $bd_format) : DateTimeFormat::utc($event['start'], $bd_format)
                );
 
                if (!empty($event['finish'])) {
-                       $event_end = L10n::getDay(
+                       $event_end = DI::l10n()->getDay(
                                !empty($event['adjust']) ?
                                DateTimeFormat::local($event['finish'], $bd_format) : DateTimeFormat::utc($event['finish'], $bd_format)
                        );
@@ -571,7 +571,7 @@ class Event
                        $start = $event['adjust'] ? DateTimeFormat::local($event['start'], 'c')  : DateTimeFormat::utc($event['start'], 'c');
                        $j     = $event['adjust'] ? DateTimeFormat::local($event['start'], 'j')  : DateTimeFormat::utc($event['start'], 'j');
                        $day   = $event['adjust'] ? DateTimeFormat::local($event['start'], $fmt) : DateTimeFormat::utc($event['start'], $fmt);
-                       $day   = L10n::getDay($day);
+                       $day   = DI::l10n()->getDay($day);
 
                        if ($event['nofinish']) {
                                $end = null;
@@ -849,7 +849,7 @@ class Event
                $tformat       = DI::l10n()->t('g:i A'); // 8:01 AM.
 
                // Convert the time to different formats.
-               $dtstart_dt = L10n::getDay(
+               $dtstart_dt = DI::l10n()->getDay(
                        $item['event-adjust'] ?
                                DateTimeFormat::local($item['event-start'], $dformat)
                                : DateTimeFormat::utc($item['event-start'], $dformat)
@@ -877,7 +877,7 @@ class Event
                // If the option 'nofinisch' isn't set, we need to format the finish date/time.
                if (!$item['event-nofinish']) {
                        $finish = true;
-                       $dtend_dt  = L10n::getDay(
+                       $dtend_dt  = DI::l10n()->getDay(
                                $item['event-adjust'] ?
                                        DateTimeFormat::local($item['event-finish'], $dformat)
                                        : DateTimeFormat::utc($item['event-finish'], $dformat)
index 6699c828722bb487b50954732c6e6b22eee3abdc..bb19fbe9b75b8b096cac47f4f63bc240f27b4ad0 100644 (file)
@@ -640,7 +640,7 @@ class Profile
 
                                        $rr['link'] = Contact::magicLink($rr['url']);
                                        $rr['title'] = $rr['name'];
-                                       $rr['date'] = L10n::getDay(DateTimeFormat::convert($rr['start'], $a->timezone, 'UTC', $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
+                                       $rr['date'] = DI::l10n()->getDay(DateTimeFormat::convert($rr['start'], $a->timezone, 'UTC', $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
                                        $rr['startime'] = null;
                                        $rr['today'] = $today;
                                }
@@ -725,7 +725,7 @@ class Profile
 
                                $rr['title'] = $title;
                                $rr['description'] = $description;
-                               $rr['date'] = L10n::getDay(DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->timezone : 'UTC', 'UTC', $bd_format)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
+                               $rr['date'] = DI::l10n()->getDay(DateTimeFormat::convert($rr['start'], $rr['adjust'] ? $a->timezone : 'UTC', 'UTC', $bd_format)) . (($today) ? ' ' . DI::l10n()->t('[today]') : '');
                                $rr['startime'] = $strt;
                                $rr['today'] = $today;
 
@@ -767,7 +767,7 @@ class Profile
                                $year_bd_format = DI::l10n()->t('j F, Y');
                                $short_bd_format = DI::l10n()->t('j F');
 
-                               $val = L10n::getDay(
+                               $val = DI::l10n()->getDay(
                                        intval($a->profile['dob']) ?
                                                DateTimeFormat::utc($a->profile['dob'] . ' 00:00 +00:00', $year_bd_format)
                                                : DateTimeFormat::utc('2001-' . substr($a->profile['dob'], 5) . ' 00:00 +00:00', $short_bd_format)
index 75211a0927e8796572041a21bd0af7cbc277cbb2..4bc2b03d1b3108feb38f64865890a14bc466af98 100644 (file)
@@ -466,11 +466,11 @@ class Temporal
                        $tddate = intval(DateTimeFormat::localNow('j'));
                }
 
-               $str_month = L10n::getDay($mtab[$m]);
+               $str_month = DI::l10n()->getDay($mtab[$m]);
                $o = '<table class="calendar' . $class . '">';
                $o .= "<caption>$str_month $y</caption><tr>";
                for ($a = 0; $a < 7; $a ++) {
-                       $o .= '<th>' . mb_substr(L10n::getDay($dn[$a]), 0, 3, 'UTF-8') . '</th>';
+                       $o .= '<th>' . mb_substr(DI::l10n()->getDay($dn[$a]), 0, 3, 'UTF-8') . '</th>';
                }
 
                $o .= '</tr><tr>';