Calculating difference of two dates

Hi guys, I want to calculate the difference of year of two dates, I search in the internet and found out of Timestampdiff. But as I use it, Slim framework do not recognize this function. Anybody who can help me??

I do not see how this is related to slim.

Can you post the code of what you are trying to do?

As @JoeBengalen stated , this is not related to Slim Framework. You may want to look into DateTime::diff, which is built-in in PHP.