/PHP-Get-DateTime-Difference-Function

Get DateTime Difference Between Two Dates and use pluralize function to format the output.

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

PHP-Get-DateTime-Difference-Function

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.

USAGE

$datetime1 = "2017-Oct-12 12:00:00";

$datetime2 = "2020-Dec-15 12:00:00";

echo getTimeDiff($datetime1, $datetime2);