Posted by member 99 on 2004-04-17 22:28:18 link

Get two times from label as 's:m:h:d' (note that this is backwards from what tnl said, I hope that's possible), then use !TimeInterval %{start} %{end}:
*script bang !TimeInterval
*script exec !setlistsep :
*script exec !varset start ":%{\1}"
*script exec !varset end ":%{\2}"
*script exec !varset max ":60:60:24:"
*script exec !varset result ""
*script exec !varset part ""
*script label noborrow
*script exec !varset borrow "0"
*script label borrow
*script exec !varset result "%{result}:%{part}"
*script exec !varset end "%{end:_}"
*script exec !varset start "%{start:_}"
*script exec !varset max "%{max:_}"
*script exec !varset part "%#%{end:}-%{start:}-%{borrow}%#"
*script gotoif ("%{max}" = "") done
*script gotoif ("%{part}" >= "0") noborrow
*script exec !varadd part "%{max:}"
*script exec !varset borrow "1"
*script goto borrow
*script label done
*script exec !varset result "%{result:_}:%{part}"
*script exec !varset result "%{result:_}"
*script ~bang

Then %{result} is almost what you want. There's gotta be some way to make it build the result the other way around, or failing that it's not too hard to flip it later. But maybe each piece needs to be formatted anyway, so it wouldn't matter what order they're in... I dunno. I've already timed out my ls.net login, so I'm done for now. :P