Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll want to review the docs for the DateTime class. But just to get you moving, the check would look something like the following:
1) You’ll need to construct a DateTime which represents 10 years ago…
2) …and use DateTime.isBefore to compare.
Note there are some subtleties with calendars which Joda does a nice job of abstracting for you; before you get too deep in this, you’ll really want to study the docs.