Move L10n::getDay() calls to DI::l10n()->getDay() calls

This commit is contained in:
nupplaPhil 2020-01-18 20:54:46 +01:00
parent d3255afa66
commit cb4ad529f4
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
4 changed files with 11 additions and 11 deletions

View 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] = [];

View 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)

View 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)

View 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>';