system.kanoa.utilities.secondsToText(secs, paramsDict)
Convert seconds into string i.e. '4 days 5Hrs 12 mins 44 secs'. paramsDict keys are optional
Parameters
secs Integer: Seconds to convert
paramsDict Dictionary
| - lang | String | Language support EN, ES, DE |
| - locale | String | The language for the units, from the installed translations, e.g. fr or pt-BR. If neither this nor lang is given, a Perspective session's own locale (session.props.locale); otherwise English |
| - roundUp | Boolean | : True if not provided. If True and showSecs is False, minutes will be shown as a whole number |
| - showDays | Boolean | True if not provided |
| - showHrs | Boolean | True if not provided |
| - showMins | Boolean | True if not provided |
| - showSecs | Boolean | True if not provided |
Returns
secondsString String
Example
print system.kanoa.utilities.secondsToText(121, {})
>>> '2mins 1sec'
# French, with French installed (or a French session, without the locale key)
print system.kanoa.utilities.secondsToText(183845, {'locale': 'fr'})
>>> '2 jours 3 h 4 min 5 s'