just to note Gordon's time comparison (see above: https://stackoverflow.com/a/2205833/1875965) is the only correct one when comparing to 'days' rather than '24 hours', as not all days have 24 hours (summertime/wintertime etc).
E.g. use
// setup timezone and get timestamp for yesterday
date_default_timezone_set('Europe/Berlin'); // change as appropriate
$yesterday = strtotime('-1 day', time());
when comparing the file date.
This may not be a big issue, but can lead to unexpected behaviour when you're working with weeks/months etc. I found it best to stick to using the above method as it'll make any process involving dates/times consistent and avoid confusion.
Also check what the timezone is for the file dates, as sometimes the default for PHP differs from the system timezone.
Kind regards, Sandra.