NAME

DynGig::Util::Time - Interpret time expressions

METHODS

rel2sec( expression )

Given a relative time expression, returns seconds.

$sec = DynGig::Util::Time->rel2sec( '3minutes,-4weeks,+4seconds' );

sec2hms( seconds )

Given seconds, returns a HH::MM::SS string.

$hms = DynGig::Util::Time->sec2hms( 37861 );

hms2sec( string )

Given a HH::MM::SS string, returns seconds.

$sec = DynGig::Util::Time->hms2sec( '40:23:26' ); ## hour:min:sec
$sec = DynGig::Util::Time->hms2sec( '23:26' );    ## min:sec
$sec = DynGig::Util::Time->hms2sec( '26' );       ## sec

NOTE

See DynGig::Util