you can use $asctime() to convert your dates into UNIX Timestamp format (the same thing returned by $ctime), then substract them to get the difference and finally reconverting them to whatever output you want using duration. Only problem I see is that duration doesn't support years, so you may have to code your own version.