Get day bounds

Get day bounds on Time

Ethereum
Ethereum
Base
Base

Reads onchain state

Ready to run on Base

Returns the start and end timestamps of the UTC day containing a timestamp. dayStart is midnight UTC of that day and dayEnd is midnight UTC of the next, so the range is half-open. Reach for it to build a daily storage key, to require the current time falls inside a stored day, or to compute how much of the day remains before a scheduled step.

Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.

More plugs on Base

Dollar-cost average on Base · 4 plugs

More on Time · 7