I'm getting this warning:

 Warning: Using "years" as a unit denomination is deprecated.
    uint date = now + 1 years;

Any idea how to fix it?


Try to use days instead, so now + 365 days. it has been deprecated because not every year is composed by 365 days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.