> For the complete documentation index, see [llms.txt](https://docs.kyberswap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kyberswap.com/reference/legacy/api-abi/core-smart-contracts/iepochutils.md).

# IEpochUtils

{% hint style="warning" %}
You are referring to the **`Legacy`** version of KyberSwap docs.

For the most updated information, please refer to:

* [**`Classic`**](https://github.com/KyberNetwork/kyberswap-documentation/blob/main/reference/legacy/api-abi/core-smart-contracts/broken-reference/README.md)
* [**`Elastic`**](/reference/legacy/kyberswap-elastic.md)
* [**`Limit Order`**](/kyberswap-solutions/limit-order.md)
* [**`Aggregator`**](/kyberswap-solutions/kyberswap-aggregator.md)
  {% endhint %}

## interface IEpochUtils

*Source*: [IEpochUtils.sol](https://github.com/KyberNetwork/smart-contracts/blob/master/contracts/sol6/Dao/IEpochUtils.sol)

***

### INDEX[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-iepochutils#index) <a href="#index" id="index"></a>

\<AUTOGENERATED\_TABLE\_OF\_CONTENTS>

### REFERENCE[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-iepochutils#reference) <a href="#reference" id="reference"></a>

#### Functions[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-iepochutils#functions) <a href="#functions" id="functions"></a>

#### `epochPeriodInSeconds`[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-iepochutils#epochperiodinseconds) <a href="#epochperiodinseconds" id="epochperiodinseconds"></a>

Returns the number of seconds defined in an epoch.

***

function **epochPeriodInSeconds**() external view returns (uint256) **Returns:**\ Number of seconds in an epoch

\
\### \`firstEpochStartTimestamp\` Returns the timestamp when the first epoch starts. \_\_\_ function \_\_firstEpochStartTimestamp\_\_() external view returns (uint256) \*\*Returns:\*\*\ Start timestamp of first epoch\
\### \`getCurrentEpochNumber\` Returns the current epoch number. \_\_\_ function \_\_getCurrentEpochNumber\_\_() external view returns (uint256)\ \*\*Returns:\*\*\ Current epoch number\
\### \`getEpochNumber\` Returns the epoch number at timestamp. \_\_\_ function \_\_getEpochNumber\_\_(uint256 timestamp) external view returns (uint256) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | \`timestamp\` | uint256 | timestamp in epoch time | \*\*Returns:\*\*\ Epoch number at timestamp


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.kyberswap.com/reference/legacy/api-abi/core-smart-contracts/iepochutils.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
