-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-30263: User date format don't apply to date fields in content item update and preview #26
Conversation
6e6afcd
to
201deca
Compare
ezplatform.user.settings.short_time_format.formatter: | ||
lazy: true | ||
factory: 'EzSystems\EzPlatformUser\UserSetting\DateTimeFormat\ShortDateFormatterFactory:getFormatter' | ||
class: 'EzSystems\EzPlatformUser\UserSetting\DateTimeFormat\Formatter' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing empty line at the end of the file
} | ||
|
||
return $this->fullDateTimeFormatter->format($date); | ||
return $formatter->format($date); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$date
is used as an argument in the format()
method. We should probably check if it is instanceof DateTime
. We can not pass here for example string
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay but level of granulation here is little overwhelming. I think single Formatter with different methods would be enough given all classes have the same dependencies. This also applies to Factories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA approved
Adds more date and time filters to twig
Warning, it is just one part, will be another pull request to admin-ui
Checklist:
$ composer fix-cs
)