Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 810 Bytes

date_parser.md

File metadata and controls

39 lines (27 loc) · 810 Bytes

DateParserTransformer

Read a string to deduce the matching \DateTime. It will throw an error if the date cannot be read.

Task reference

  • Service: CleverAge\ProcessBundle\Transformer\DateParserTransformer
  • Transformer code: date_parser

Accepted inputs

string

Possible outputs

\DateTime

Options

Code Type Required Default Description
format string X See PHP date formats for supported values

Examples

  • Example : this will correctly read the string "2019-12-02"
# Transformer options level
transformers:
    date_parser:
        format: Y-m-d