|
Time\Duration::absoluteReturns the absolute value of the duration Description
public Time\Duration Time\Duration::absolute()
Returns the absolute value of the duration, that is, a duration with the
same Time\Duration::$seconds and
Time\Duration::$nanoseconds values whose
Time\Duration::$negative property is ParametersThis function has no parameters. Return ValuesReturns a non-negative Time\Duration object. ExamplesExample #1 Time\Duration::absolute example The above example will output:
bool(true)
object(Time\Duration)#1 (3) {
["seconds"]=>
int(15)
["nanoseconds"]=>
int(0)
["negative"]=>
bool(false)
}
See Also
|