<p>Given the slot lenght is one second, this is pretty easy.</p>
<ol>
<li>Find the current slot number.</li>
</ol>
<pre><code>$ curl -s  -H &quot;project_id: $BLOCKFROST_PROJECT_ID&quot; https://cardano-mainnet.blockfrost.io/api/v0/blocks/latest | jq .slot
40664369
</code></pre>
<ol start="2">
<li>Add 6 months to it (roughly)</li>
</ol>
<pre><code>$ expr 40664369 + $((60*60*24*30*6))
56216369
</code></pre>

CC BY-SA 4.0
2021-09-21T13:25:42.587Z
2021-09-21T13:25:42.587Z
Marek Mahut - StakeNuts
<p>How can I calculate when the policy is going to be locked? I have the policy script file and I need to specify the <code>before</code> slot but I don't know how to calculate it.</p>
<p>For example, I want the policy to be locked in 6 months.</p>

<nft><minting><policy>
Calculate a policy locking
# Calculate a policy locking

(Asked by: username_0 on 2021-09-18)

How can I calculate when the policy is going to be locked? I have the policy script file and I need to specify the `before` slot but I don't know how to calculate it.

For example, I want the policy to be locked in 6 months.

**Tags:** nft, minting, policy

---

## 1 answers

### Answer by username_1 on 2021-09-21. Score: 3 | Accepted answer

Given the slot lenght is one second, this is pretty easy.

Find the current slot number.

$ curl -s  -H "project_id: $BLOCKFROST_PROJECT_ID" https://cardano-mainnet.blockfrost.io/api/v0/blocks/latest | jq .slot
40664369


Add 6 months to it (roughly)

$ expr 40664369 + $((60*60*24*30*6))
56216369


---

