I'm looking for a way (preferably easy) to turn a time, as reported in seconds, to one of the following:
1) If the time is less than 1 day, use HH:nn:ss format
1a) I realize that this is easily done with $duration
2) If the time is greater than one day, return A weeks B days HH:nn:ss

$duration(<time>) returns Aweeks Bdays Chrs Dmins Esecs
unless the numeric is 0, in which case the associated wording also isn't displayed.

I hope this makes sense to more than just me, but if it doesn't, let me know and I'll try to clarify.

P.S.: This is intended to be used as an alias that will return the value to a dialog.