# EpochUtils

{% 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`**](https://docs.kyberswap.com/reference/legacy/kyberswap-elastic)
* [**`Limit Order`**](https://docs.kyberswap.com/kyberswap-solutions/limit-order)
* [**`Aggregator`**](https://docs.kyberswap.com/kyberswap-solutions/kyberswap-aggregator)
  {% endhint %}

## contract EpochUtils

is [IEpochUtils](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-iepochutils.md) imports SafeMath, [IEpochUtils](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-iepochutils.md)

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

***

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

\<AUTOGENERATED\_TABLE\_OF\_CONTENTS>

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

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

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

Returns the current epoch number.

***

function **getCurrentEpochNumber**() public view override returns (uint256)\ **Returns:**\ Current epoch number

\
\### \`getEpochNumber\` Returns the epoch number at timestamp. \_\_\_ function \_\_getEpochNumber\_\_(uint256 timestamp) public view override returns (uint256) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | \`timestamp\` | uint256 | timestamp in epoch time | \*\*Returns:\*\*\ Epoch number at timestamp
