Is your feature request related to a problem? Please describe.
I'm often dealing with Duration objects from a number of minutes, and display them as nhours, xminutes, but not in higher unit. I could use the rescale() function, but it doesn't take any unit.
Another way would be that the shiftTo function can optionally ignore zero-ed units.
Describe the solution you'd like
The ideal option would be that the rescale function could take time units, removing units at 0.
Otherwise, it would be great that the shiftTo function had an option to remove zero-ed values.
Describe alternatives you've considered
I need to use the shiftTo function with shiftTo('minutes', 'hours'), but it doesn't automatically removes the values at 0, so it can display 0 hours and 20 minutes, or 2 hours and 0 minutes.
Is your feature request related to a problem? Please describe. I'm often dealing with Duration objects from a number of minutes, and display them as nhours, xminutes, but not in higher unit. I could use the
rescale()
function, but it doesn't take any unit. Another way would be that theshiftTo
function can optionally ignore zero-ed units.Describe the solution you'd like The ideal option would be that the
rescale
function could take time units, removing units at 0. Otherwise, it would be great that theshiftTo
function had an option to remove zero-ed values.Describe alternatives you've considered I need to use the
shiftTo
function withshiftTo('minutes', 'hours')
, but it doesn't automatically removes the values at 0, so it can display0 hours and 20 minutes
, or2 hours and 0 minutes
.