PHP function date_diff() can be used to calculate the difference between two dates.
Here is an example:
<?php$date1=date_create("2020-6-15");$date2=date_create("2021-1-12");$diff=date_diff($date1,$date2);echo $diff->format("%R%a days");?>
The above code will return +211 days.