function · Browser and Node

# epochIndex

The epoch's index: periods since 1970.

`@toip-tools/anon-membership` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/anon-membership/src/roots.ts#L52)

Import:

```ts
import { epochIndex } from "@toip-tools/anon-membership";
```

## Declaration

Signature:

```ts
epochIndex(epoch: string, period?: number): number;
```

### Parameters

**`epoch` (required)**

`string`

**`period` (optional)**

`number`

Default: `DAY_SECONDS`

### Returns

`number`

[Usage guide](https://toip.tools/toolkit/anon-membership/#usage) · [Error handling](https://toip.tools/toolkit/anon-membership/#errors) · [All exports](https://toip.tools/toolkit/anon-membership/api/)

---

This is the Markdown version of https://toip.tools/toolkit/anon-membership/api/epochIndex/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
