> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# parseDuration()

> Function exported by @botmesh/core.

```ts theme={null}
function parseDuration(input): number;
```

Defined in: [utils/duration.ts:24](https://github.com/andresayac/botmesh/blob/main/packages/core/src/utils/duration.ts#L24)

Parse a duration into milliseconds. The single grammar every duration option of
the bot uses (`'500ms'`, `'90s'`, `'2m'`, `'1h'`, `'1d'`, `'1w'`, long forms such as
`'5 minutes'`, or a number / digit string meaning milliseconds).

## Parameters

| Parameter | Type |
| - | - |
| `input` | `string` \| `number` |

## Returns

`number`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.