alias wtime {
if ($$1 < $duration(1day)) return $duration($1,3)
tokenize 58 $duration($1,3)
; $2=nn and $3=ss are fine; calculate HH out of $1
var %hh = $base($calc($1 % 24),10,10,2)
; get full-written weeks/days/hours string, remove the hours-part from it (if any)
var %wdh = $duration($duration($1 h)), %wd = $iif(%hh,$gettok(%wdh,1--2,32),%wdh)
return %wd $+(%hh,:,$2,:,$3)
}