Time units
Turn minutes, hours, days, and weeks into their integer second values.
Solidity 0.8.36REPL mode
Why use this example
Use this pattern to confirm Solidity arithmetic and unit behavior before putting the same expression into a contract. The entry isolates time units so its input, result, and state changes stay easy to compare.
Solidity to run
uint256 minute = 1 minutes
uint256 duration = 2 days + 3 hours + 15 minutes
minute
duration
duration / 1 hoursOfficial Solidity reference
Compare this focused investigation with the complete language definition in the Solidity documentation.
Time unitsWhat to expect
One minute becomes 60 seconds, the combined duration becomes 184,500 seconds, and integer division reports 51 whole hours.
Continue the investigation
Change a value, add another expression, or open Inspect after the run. Accepted entries remain available to the next entry, and the clean replay keeps the complete result reproducible.
Read about writing Solidity Prototype Solidity behavior