I was using PHP’s date_diff() function to compare 2 dates. I wanted to make sure that a date that the user selected was at least one day away from today. The issue was that for “today” I was using: And comparing this against the user inputted date. When I compared “today” vs “tomorrow,” it said that there were 0 days.

The solution was to change it to this:
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners