I am using ACF as part of for contract management. So I have valid_until date for each contract. What I need is to calculate the remaining days of active contracts. Remaining days would be valid_until – today. I am planing to save this to a ACF field called remaining_days wit a cron job that would run every day.
I have the below code and when I run with a cron job, it saves 0 (zero).