Skip to content

kumo.time.parse_duration

Since: Dev Builds Only

The functionality described in this section requires a dev build of KumoMTA. You can obtain a dev build by following the instructions in the Installation section.

local time = kumo.time.parse_duration(DURATION)

Parses a duration to create a TimeDelta object.

DURATION can be:

  • A signed integer number of seconds
  • A signed floating point number of seconds
  • A duration string like 5 minutes

Example

local delta = kumo.time.parse_duration '5m'