Again, using the same function that we created at the beginning and changing the parameters appropriately we can calculate how many days until a given date. There is a problem though; the UNIX timestamp only works for dates between January 1st, 1970 and December 31st, 2037. Dates outside that range will give an unpredictable result.
Now, hoping that we'll come up with a solution for this in the next thirty years let's do the math:
$str_future_date = "2028-04-26"; // I'll be fifty this day! date_diff(date("Y-m-d H:i:s"), $str_future_date);
At this point you should be familiar with the function, just tweaking the parametersa little. In this case the first parameter is the exact date of today and the second is the future date that we want to know how many days until.