Convert seconds to compound duration: Difference between revisions

m
Line 2,813:
particular set of units and labels.
'''
 
# angloCompoundDuration :: Int -> String
def angloCompoundDuration(n):
'''A compound duration string represention of the given
number of seconds, using English duration labels,
assuming fulll 24h days, and seven day weeks.
'''
return ', '.join(
compoundDurationFromUnits([0, 7, 24, 60, 60])(
['wk', 'd', 'hr', 'min', 'sec']
)(n)
)
 
print(
fTable('Compound durations:\n')(str)(str)(
angloCompoundDurationlambda n: ', '.join(
compoundDurationFromUnits([0, 7, 24, 60, 60])(
['wk', 'd', 'hr', 'min', 'sec']
)(n)
''' )
)([7259, 86400, 6000000])
)
9,659

edits