Convert seconds to compound duration: Difference between revisions
Convert seconds to compound duration (view source)
Revision as of 23:33, 2 December 2019
, 4 years ago→Python: Functional
Line 2,813:
particular set of units and labels.
'''
'''▼
compoundDurationFromUnits([0, 7, 24, 60, 60])(▼
['wk', 'd', 'hr', 'min', 'sec']▼
)(n)▼
print(
fTable('Compound durations:\n')(str)(str)(
▲ compoundDurationFromUnits([0, 7, 24, 60, 60])(
▲ ['wk', 'd', 'hr', 'min', 'sec']
▲ )(n)
)([7259, 86400, 6000000])
)
|