(PHP 5 >= 5.3.0, PHP 7)
Formats the interval
public string DateInterval::format ( string $format )
Formats the interval.
Parameters:
format
The following characters are recognized in the format parameter string. Each format character must be prefixed by a percent sign (%).
format character Description Example values % Literal %
% Y Years, numeric, at least 2 digits