Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : Time.sol
// SPDX-License-Identifier: MIT pragma solidity 0.8.26; library Time { ///@notice Gets the current timestamp function blockTs() internal view returns (uint32 ts) { assembly { ts := timestamp() } } ///@notice Gets the the day count from a timestamp function dayCountByT(uint32 t) internal pure returns (uint32 dayCount) { assembly { let adjustedTime := sub(t, 50400) dayCount := div(adjustedTime, 86400) } } function daysSince(uint32 t) public view returns (uint32 daysPassed) { assembly { // Get the current block timestamp let currentTime := timestamp() daysPassed := div(sub(currentTime, t), 86400) } } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.