DateInterval::format
PHP 5 >= 5.3.0, PHP 7, PHP 8
DateInterval::format - Formats the interval
Example #1 DateInterval and
DateTime::diff with the %a and %d modifiers
Result: 31 total days
1 month, 0 days
Example #2 DateInterval example
Result: 4 days
Example #3 DateInterval and carry over points
Result: 32 days