configure am/pm time-format as user preference (#2789)
This commit is contained in:
@@ -64,13 +64,12 @@ final class ConfigurationController extends BaseApiController
|
||||
|
||||
$model = new I18nConfig();
|
||||
$model
|
||||
->setFormDateTime($formats->getDateTimeTypeFormat($locale))
|
||||
->setFormDate($formats->getDateTypeFormat($locale))
|
||||
->setDateTime($formats->getDateTimeFormat($locale))
|
||||
->setDate($formats->getDateFormat($locale))
|
||||
->setDuration($formats->getDurationFormat($locale))
|
||||
->setTime($formats->getTimeFormat($locale))
|
||||
->setIs24hours($formats->isTwentyFourHours($locale))
|
||||
->setIs24hours($user->is24Hour())
|
||||
->setNow($this->getDateTimeFactory()->createDateTime())
|
||||
;
|
||||
|
||||
|
||||
@@ -18,17 +18,6 @@ use JMS\Serializer\Annotation as Serializer;
|
||||
*/
|
||||
final class I18nConfig
|
||||
{
|
||||
/**
|
||||
* Format used for 'begin' and 'end'
|
||||
*
|
||||
* @var string
|
||||
*
|
||||
* @Serializer\Expose()
|
||||
* @Serializer\Groups({"Default"})
|
||||
* @Serializer\Type(name="string")
|
||||
* @phpstan-ignore-next-line
|
||||
*/
|
||||
private $formDateTime = '';
|
||||
/**
|
||||
* Format used for toolbar queries
|
||||
*
|
||||
@@ -114,13 +103,6 @@ final class I18nConfig
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFormDateTime(string $formDateTime): I18nConfig
|
||||
{
|
||||
$this->formDateTime = $formDateTime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFormDate(string $formDate): I18nConfig
|
||||
{
|
||||
$this->formDate = $formDate;
|
||||
|
||||
Reference in New Issue
Block a user