Solidity has keywords like
weeks that are used to specify units of time.
Why do they not have
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
Solidity had the
year keyword in all versions prior to
0.5.0. It was removed due to complications and confusions about leap years.
From the Time Units section of the docs:
Take care if you perform calendar calculations using these units, because not every year equals 365 days and not even every day has 24 hours because of leap seconds. Due to the fact that leap seconds cannot be predicted, an exact calendar library has to be updated by an external oracle.