FunctionsDate Functions
$parseTime
Convert human-readable time strings into a duration. This function accepts a single duration or multiple durations combined into one expression, and can optionally return the result in a different unit.
Usage
$parseTime[time;unit?]Arguments:
-
time: A time duration to convert. Supported units include:ms— millisecondss— secondsm— minutesh— hoursd— daysw— weeksM— months (30 days)y— years (365 days)
-
unit(optional): The unit to return. Supported values arems,s,m,h,d,w,M,y, or their full names (such asseconds,hours, anddays). Defaults toms.
Multiple durations can be combined by separating them with spaces. As a convenience, compact expressions without spaces are also supported.
Examples
Member
9/5/2026
!!exec $parseTime[1m]
Custom Command
APP
9/5/2026
60000
Member
9/5/2026
!!exec $parseTime[1h 30m]
Custom Command
APP
9/5/2026
5400000
Member
9/5/2026
!!exec $parseTime[1h30m]
Custom Command
APP
9/5/2026
5400000
Member
9/5/2026
!!exec $parseTime[1h30m;m]
Custom Command
APP
9/5/2026
90
Explanation:
$parseTime[1m]converts 1 minute into60000milliseconds.$parseTime[1h 30m]converts 1 hour and 30 minutes into5400000milliseconds.$parseTime[1h30m]is interpreted the same way as1h 30mfor convenience.$parseTime[1h30m;m]returns the result in minutes instead of milliseconds.