configure am/pm time-format as user preference (#2789)

This commit is contained in:
Kevin Papst
2021-11-14 18:18:26 +01:00
committed by GitHub
parent dce0578a2b
commit 8b0962e192
32 changed files with 216 additions and 260 deletions

View File

@@ -60,28 +60,6 @@ final class LanguageFormattings
return $this->momentFormatter->convert($this->getDateTypeFormat($locale));
}
/**
* Returns the format which is used by the form component to handle datetime values.
*
* @param string $locale
* @return string
*/
public function getDateTimeTypeFormat(string $locale): string
{
return $this->getConfig('date_time_type', $locale);
}
/**
* Returns the format which is used by the Javascript component to handle datetime values.
*
* @param string $locale
* @return string
*/
public function getDateTimePickerFormat(string $locale): string
{
return $this->momentFormatter->convert($this->getDateTimeTypeFormat($locale));
}
/**
* Returns the locale specific date format, which should be used in combination with the twig filter "|date".
*
@@ -126,17 +104,6 @@ final class LanguageFormattings
return $this->getConfig('duration', $locale);
}
/**
* Returns whether this locale uses the 24 hour format.
*
* @param string $locale
* @return bool
*/
public function isTwentyFourHours(string $locale): bool
{
return (bool) $this->getConfig('24_hours', $locale);
}
/**
* @param string $key
* @param string $locale