Skip to content

Latest commit

 

History

History
75 lines (67 loc) · 1.93 KB

File metadata and controls

75 lines (67 loc) · 1.93 KB

<-- Go back to README.md

Round

Converts the provided number into a collection of time units.
The displayed time units depend on if any remainder can be converted into one and the used source unit.

Placeholder patterns

  • %formatter_number_time_<number>%
  • %formatter_number_time_<time_unit>_<number>%

Options

Option Description

time_unit

The Time unit to treat the provided number as

Available Time units:
  • fromMilliseconds / fromMs - Treats the number as milliseconds
  • fromSeconds / fromSecs - Treats the number as seconds
  • fromMinutes / fromMins - Treats the number as minutes
  • fromHours / fromHrs - Treats the number as hours
Type: String
Required? No
Default: fromSeconds

number

The number to convert.
Type: Number
Required? Yes
Condition:
  • 0 ≤ x

Examples

/papi parse me %formatter_number_time_100%          -> 1m 40s
/papi parse me %formatter_number_time_fromMs_1200%  -> 1s 200ms
/papi parse me %formatter_number_time_fromSecs_100% -> 1m 40s
/papi parse me %formatter_number_time_fromMins_100% -> 1h 40m
/papi parse me %formatter_number_time_fromHrs_100%  -> 4d 4h