added support for Ante meridiem and Post meridiem format (#615)
This commit is contained in:
@@ -111,6 +111,17 @@ class LocaleSettings
|
||||
return $this->getConfigByLocaleAndKey('date', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the locale specific time format, which should be used in combination with the twig filter "|time".
|
||||
*
|
||||
* @param null|string $locale
|
||||
* @return string
|
||||
*/
|
||||
public function getTimeFormat(?string $locale = null): string
|
||||
{
|
||||
return $this->getConfigByLocaleAndKey('time', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the locale specific datetime format, which should be used in combination with the twig filter "|date".
|
||||
*
|
||||
@@ -133,6 +144,17 @@ class LocaleSettings
|
||||
return $this->getConfigByLocaleAndKey('duration', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether this locale uses the 24 hour format.
|
||||
*
|
||||
* @param null|string $locale
|
||||
* @return bool
|
||||
*/
|
||||
public function isTwentyFourHours(?string $locale = null): bool
|
||||
{
|
||||
return $this->getConfigByLocaleAndKey('24_hours', $locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param null|string $locale
|
||||
|
||||
Reference in New Issue
Block a user