DateInterval::formatFormats the interval Description
public string DateInterval::format(string
$format)Formats the interval. Parameters
Return ValuesReturns the formatted interval. Changelog
Examples
Example #1 DateInterval example The above example will output: 4 days
Example #2 DateInterval and carry over points The above example will output: 32 days
Example #3 DateInterval and DateTime::diff with the %a and %d modifiers The above example will output: 31 total days 1 month, 0 days Notes
See Also
|