Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Latest commit

 

History

History
86 lines (76 loc) · 2.11 KB

File metadata and controls

86 lines (76 loc) · 2.11 KB

<-- Go back to README.md

FromTo

Converts the provided number from one time unit to another. The time unit will also be attached to the number.
Any remainders/fractions will be discarded.

Placeholder patterns

  • %formatter_number_from:<old_time_unit>_to:<new_time_unit>_<number>%

Options

Option Description

old_time_unit

The Time unit to use as the original number's unit.

⚠️ See below for available time units and their options. ⚠️
Type: String
Required? Yes

new_time_unit

The Time unit to use as the number's new format.

⚠️ See below for available time units and their options. ⚠️
Type: String
Required? Yes

number

The number to convert.
Type: Number
Required? Yes

Time units

Time Unit Available options
Day days, day
Hour hours, hour, hrs
Minute minutes, minute, mins, min
Second seconds, second, secs, sec
Millisecond milliseconds, millisecond, millis, ms

Examples

/papi parse me %formatter_number_from:secs_to:mins_120% -> 2m
/papi parse me %formatter_number_from:mins_to:hrs_119%  -> 1h