Read a string
to deduce the matching \DateTime
. It will throw an error if the date cannot be read.
- Service:
CleverAge\ProcessBundle\Transformer\DateParserTransformer
- Transformer code:
date_parser
string
\DateTime
Code | Type | Required | Default | Description |
---|---|---|---|---|
format |
string |
X | See PHP date formats for supported values |
- Example : this will correctly read the string "2019-12-02"
# Transformer options level
transformers:
date_parser:
format: Y-m-d