Get DateTime Difference Between Two Dates and use pluralize function to format the output.
The function returns the difference in number of years, months, days, hours, minues and seconds.
$datetime1 = "2017-Oct-12 12:00:00";
$datetime2 = "2020-Dec-15 12:00:00";
echo getTimeDiff($datetime1, $datetime2);