DateIntervalToStringTransformer

DateIntervalToStringTransformer

class DateIntervalToStringTransformer implements DataTransformerInterface

Transforms between a date string and a DateInterval object.

Methods

__construct(string $format = 'P%yY%mM%dDT%hH%iM%sS', bool $parseSigned = false)

Transforms a \DateInterval instance to a string.

mixed transform(mixed $value)

Transforms a DateInterval object into a date string with the configured format.

mixed reverseTransform(mixed $value)

Transforms a date string in the configured format into a DateInterv