You need to change…
…to…say $first_dt_utc->delta_days($second_dt_utc)->days(), ' days difference';
say $first_dt_utc->delta_days($second_dt_utc)->delta_days(), ' days difference';
See How can I calculate the difference in days between dates? in FAQ: Sample Calculations on the DateTime project wiki.
In reply to Re^2: How to compare date/times in different timezones?
by Jim
in thread How to compare date/times in different timezones?
by philled
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |