asDuration() public method (available since version 2.0.7)
Represents the value as duration in human readable format.
| public string asDuration ( $value, $implodeString = ', ', $negativeSign = '-' ) | ||
|---|---|---|
| $value | DateInterval|string|integer |
The value to be formatted. Acceptable formats:
|
| $implodeString | string |
Will be used to concatenate duration parts. Defaults to |
| $negativeSign | string |
Will be prefixed to the formatted duration, when it is negative. Defaults to |
| return | string |
The formatted duration. |
Please login to continue.