Automate

Automate

Make your phone or tablet smarter with automation

Get it on Google Play

durationFormat

text durationFormat(duration, pattern, language)

Returns the duration formatted according to pattern, language is currently igonred.

Pattern symbols with special meaning:

SymbolComponent
dDays
HHours
mMinutes
sSeconds
SMilliseconds
'Avoid interpretation
''Single quote

Examples

PatternResult
H:mm:ss.SSS1:34:12.678
H'h'm'm's's'1h34m12s
H 'hours', m 'minutes', s 'seconds'1 hours, 34 minutes, 12 seconds

Parameters

  1. duration — duration in seconds.
  2. pattern — optional formatting pattern, default is H'h'm'm's's'.
  3. language — optional language code, currently ignored.

Returns

  • the formatted duration.
Note! This documentation can also be found in the Help & feedback menu of the app.