Converts hours, minutes, seconds and optional milliseconds into seconds.
timeConvert(mixed $seconds = 0, integer $minutes = 0, integer $hours = 0, integer $ms = 0): mixed
seconds (mixed) : Seconds to convert. Negative values and milliseconds allowed (ex. -12.345)
minutes (integer) : Minutes to convert. Negative values allowed. ^(optional)^
hours (integer) : Hours to convert. Negative values allowed. ^(optional)^
ms (integer) : Milliseconds to convert. Negative values allowed. Integers only, no decimals. ^(optional)^
(mixed) : Returns the converted hours, minutes, seconds and milliseconds into a single value representing the total duration in seconds.
$fx->timeConvert(59, 59, 23) = 86399 $fx->timeConvert(0, 0, 5) = 18000 $fx->timeConvert(-56, 34, 12) = 45184 $fx->timeConvert(56, -34, 12) = 41216 $fx->timeConvert(0.7, 0, 3) = 10800.700 $fx->timeConvert(1, 2, 3, 4567) = 10925.567 $fx->timeConvert(1, 2, 3, -4567) = 10916.433
Home | CoreyFX | Date and Time Processing
There was an error while loading. Please reload this page.