in reply to Re: Yesterday Date
in thread Yesterday Date

This code has some serious problems. First of all, what if the current time is 11:30PM right before the Spring daylight-savings switch? After your sleep, it'll be 12:30AM two days later, not just one.

Second scenario is that it's 12:30AM the morning of the Autumn switch? After your sleep, it'll be 11:30AM the same day.

These are serious problems that you need to address.

How about 12:00:00.1AM (midnight) on a day that has a leap *second* attached? After 86_400 seconds, you end up right before midnight on the same day!

Serious serious problems with this code.

:-)