Common & useful classes, resources, extensions. Based on Symfony framework.
Located here: Meritoo\CommonBundle\Service\DateService
. Serves dates.
Uses parameters:
- date.format.date:
d.m.Y
(default value) - date.format.datetime:
d.m.Y H:i
(default value) - date.format.time:
H:i
(default value)
Returns format of date according to given length of date. There are 3 lengths of date:
- date -
Meritoo\CommonBundle\Type\Date\DateLength::DATE
constant - datetime -
Meritoo\CommonBundle\Type\Date\DateLength::DATETIME
constant - time -
Meritoo\CommonBundle\Type\Date\DateLength::TIME
constant
Format of date is based on those lengths of date that are stored in application's configuration in these parameters:
- date.format.date
- date.format.datetime
- date.format.time
Returns date formatted according to given length of date. Format of date is provided by getDateFormat()
method (
described above).
- Configuration
- Dependency Injection Extension
- Descriptor of application
- Descriptor of bundle
- Descriptors of bundles
- Services:
- Tests
- Translations
- Twig extensions: