{"repo":"monosux/ethereum-block-by-date","free":true,"listed":false,"github":"https://github.com/monosux/ethereum-block-by-date","clone":"git clone https://github.com/monosux/ethereum-block-by-date.git","description":"Get Ethereum block number by a given date. Or blocks by a given period duration.","language":"JavaScript","stars":100,"topics":["ethereum","blockchain","web3"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Ethereum Block By Date Get Ethereum block number by a given date. Or blocks by a given period duration. Works with any Ethereum based mainnet or testnet networks. Works with web3.js, ethers.js and viem Installation Use npm: Or yarn: Usage Using with Web3.js Using with Ethers.js Using with Viem Requests Note: if the given date is before the first block date in the blockchain, the script will return 1 as block number. If the given date is in the future, the script will return the last block number in the blockchain. Moment.js The package uses moment.js plugin to parse dates. Read more about valid dates and time zones in the plugin's documentation: Moment.js Demo Explore the online demo of this package at blockanddate.com, crafted by 0xAskar. Examples Every first block of the year: Every last block of the year: Every first block of every 4 hours of October 10, 2019: Need Help If you need any help, please contact me via GitHub issues page: GitHub Donations If you like my package and you want to support the development or buy me a cup of coffee, you could donate to me via Ethereum: 0x18F54b91f7e19c51fA701E7ed5628fA45441d872 Thanks ❤️","default_branch":null,"files":null,"tree":[],"storefront":"/r/monosux","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/monosux/ethereum-block-by-date/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}