@antiraid-ext/unit
API reference for @antiraid-ext/unit
@antiraid-ext/unit
Functions
parseToSeconds
Parses a string to seconds
E.g. `1 hour` -> 3600, `1h` -> 3600, `1 hour 30 minutes` -> 5400, `1h30m` -> 5400, `1h30min 1 seconds` -> 3600+1800+1=5401
Function Signature
--- Parses a string to seconds
---
--- E.g. \`1 hour\` -> 3600, \`1h\` -> 3600, \`1 hour 30 minutes\` -> 5400, \`1h30m\` -> 5400, \`1h30min 1 seconds\` -> 3600+1800+1=5401
function parseToSeconds(input: string) -> number end
Arguments
input
Returns
ret1
Last updated on