Parses a Faraway duration string and returns its length in seconds.
| Name | Type | Description |
|---|---|---|
text | string | Duration text accepted by the server's duration parser. |
A number of seconds, or nil if the text is not a valid duration.
local seconds = server.parseTime("1h30m")
if seconds then
server.tempban("Alex", seconds, "Temporary ban", "Example")
end
30s, 10m, 2h, 3d, and 1w.