You will want to view the docs for the DateTime class . But in order to make you move, the check will look something like this:
1) You will need to create a DateTime that will be presented 10 years ago ...
DateTime tenYearsAgo = new DateTime();
tenYearsAgo = tenYearsAgo.minusYears(10);
2) ... and use DateTime.isBefore for comparison.
if (myDateTime.isBefore(tenYearsAgo)) { }
else { }
, , ; , .