mirror of
https://github.com/friendica/friendica
synced 2025-03-12 06:28:25 +00:00
Fix code style in src/Util/Temporal
This commit is contained in:
parent
f3202b0508
commit
8f0a31dc1e
1 changed files with 57 additions and 54 deletions
|
@ -147,7 +147,8 @@ class Temporal
|
|||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate("field_input.tpl");
|
||||
$o = Renderer::replaceMacros($tpl,
|
||||
$o = Renderer::replaceMacros(
|
||||
$tpl,
|
||||
[
|
||||
'$field' => [
|
||||
'dob',
|
||||
|
@ -157,7 +158,8 @@ class Temporal
|
|||
'',
|
||||
'placeholder="' . DI::l10n()->t('YYYY-MM-DD or MM-DD') . '"'
|
||||
]
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
@ -223,17 +225,19 @@ class Temporal
|
|||
bool $picktime = true,
|
||||
string $minfrom = '',
|
||||
string $maxfrom = '',
|
||||
bool $required = false): string
|
||||
{
|
||||
bool $required = false
|
||||
): string {
|
||||
// First day of the week (0 = Sunday)
|
||||
$firstDay = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'calendar', 'first_day_of_week') ?: 0;
|
||||
|
||||
$lang = DI::l10n()->toISO6391(DI::l10n()->getCurrentLang());
|
||||
|
||||
// Check if the detected language is supported by the picker
|
||||
if (!in_array($lang,
|
||||
if (!in_array(
|
||||
$lang,
|
||||
['ar', 'ro', 'id', 'bg', 'fa', 'ru', 'uk', 'en', 'el', 'de', 'nl', 'tr', 'fr', 'es', 'th', 'pl', 'pt', 'ch', 'se', 'kr',
|
||||
'it', 'da', 'no', 'ja', 'vi', 'sl', 'cs', 'hu'])) {
|
||||
'it', 'da', 'no', 'ja', 'vi', 'sl', 'cs', 'hu']
|
||||
)) {
|
||||
$lang = 'en';
|
||||
}
|
||||
|
||||
|
@ -351,8 +355,7 @@ class Temporal
|
|||
// translators - e.g. 22 hours ago, 1 minute ago
|
||||
if($isfuture) {
|
||||
$format = DI::l10n()->t('in %1$d %2$s');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$format = DI::l10n()->t('%1$d %2$s ago');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue