« Return to Thread: Does Such A Tag Already Exist?

Re: Does Such A Tag Already Exist?

by Steve Piercy :: Rate this Message:

Reply to Author | View in Thread

I don't think it exists yet.  If you create one, please do post it to tagswap.net.

I would start off by taking the string, '1d 17h 45m 22s', split on space, then parse each element in the resulting array.

Ultimately you would end up with this:

    var('mydur' = duration($h + ':' + $m + ':' + $s));
    $mydur;

=> 41:45:22

--steve


On Tuesday, June 30, 2009, blindsay@... (Brad Lindsay) pronounced:

>Before I go off and write this tag myself, I was wondering if a tag  
>existed to parse / cast into a duration a string of the following  
>format: '1d 17h 45m 22s'
>
>I haven't found any searching through tagSwap, but I thought I might  
>be missing something.
>
>-Brad
>
>--
>This list is a free service of LassoSoft: http://www.LassoSoft.com/
>Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>Manage your subscription: http://www.ListSearch.com/Lasso/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<web@...>                  <http://www.StevePiercy.com/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/


 « Return to Thread: Does Such A Tag Already Exist?